PHP 5.4 이상에서의 호환성 문제 개선.

This commit is contained in:
bnu 2013-12-04 20:17:14 +09:00
parent 2bf31f566a
commit 7daa63cedf
9 changed files with 22 additions and 17 deletions

View file

@ -523,7 +523,7 @@ class mobileXE
$this->setUpperUrl(getUrl('cmid',$upper_srl), Context::getLang('cmd_go_upper')); $this->setUpperUrl(getUrl('cmid',$upper_srl), Context::getLang('cmd_go_upper'));
if(preg_match('/^([a-zA-Z0-9\_\-]+)$/', $cur_item['url'])) if(preg_match('/^([a-zA-Z0-9\_\-]+)$/', $cur_item['url']))
{ {
$obj = null; $obj = array();
$obj['href'] = getUrl('','mid',$cur_item['url']); $obj['href'] = getUrl('','mid',$cur_item['url']);
$obj['link'] = $obj['text'] = '['.$cur_item['text'].']'; $obj['link'] = $obj['text'] = '['.$cur_item['text'].']';
$childs[] = $obj; $childs[] = $obj;
@ -541,7 +541,7 @@ class mobileXE
foreach($list as $key => $val) foreach($list as $key => $val)
{ {
if(!$val['text']) continue; if(!$val['text']) continue;
$obj = null; $obj = array();
if(!count($val['list'])) if(!count($val['list']))
{ {
$obj['href'] = getUrl('','mid',$val['url']); $obj['href'] = getUrl('','mid',$val['url']);
@ -574,7 +574,7 @@ class mobileXE
} }
$lang_supported = Context::get('lang_supported'); $lang_supported = Context::get('lang_supported');
$lang_type = Context::getLangType(); $lang_type = Context::getLangType();
$obj = null; $obj = array();
$obj['link'] = $obj['text'] = Context::getLang('president_lang').' : '.$lang_supported[$lang_type]; $obj['link'] = $obj['text'] = Context::getLang('president_lang').' : '.$lang_supported[$lang_type];
$obj['href'] = getUrl('sel_lang',$lang_type); $obj['href'] = getUrl('sel_lang',$lang_type);
$childs[] = $obj; $childs[] = $obj;
@ -583,7 +583,7 @@ class mobileXE
{ {
foreach($lang_supported as $key => $val) foreach($lang_supported as $key => $val)
{ {
$obj = null; $obj = array();
$obj['link'] = $obj['text'] = $val; $obj['link'] = $obj['text'] = $val;
$obj['href'] = getUrl('sel_lang',$key); $obj['href'] = getUrl('sel_lang',$key);
$childs[] = $obj; $childs[] = $obj;

View file

@ -456,7 +456,7 @@ class adminAdminController extends admin
*/ */
function _deleteAllFavorite() function _deleteAllFavorite()
{ {
$args = NULL; $args = new stdClass;
$output = executeQuery('admin.deleteAllFavorite', $args); $output = executeQuery('admin.deleteAllFavorite', $args);
return $output; return $output;
} }

View file

@ -371,7 +371,7 @@ class fileController extends file
$srl = (int)$srls[$i]; $srl = (int)$srls[$i];
if(!$srl) continue; if(!$srl) continue;
$args = null; $args = new stdClass;
$args->file_srl = $srl; $args->file_srl = $srl;
$output = executeQuery('file.getFile', $args); $output = executeQuery('file.getFile', $args);
if(!$output->toBool()) continue; if(!$output->toBool()) continue;
@ -756,12 +756,13 @@ class fileController extends file
$oDocumentController = &getController('document'); $oDocumentController = &getController('document');
$documentSrlList = array(); $documentSrlList = array();
for($i=0;$i<count($srls);$i++) for($i=0;$i<count($srls);$i++)
{ {
$srl = (int)$srls[$i]; $srl = (int)$srls[$i];
if(!$srl) continue; if(!$srl) continue;
$args = null; $args = new stdClass;
$args->file_srl = $srl; $args->file_srl = $srl;
$output = executeQuery('file.getFile', $args); $output = executeQuery('file.getFile', $args);
@ -777,16 +778,20 @@ class fileController extends file
$source_filename = $output->data->source_filename; $source_filename = $output->data->source_filename;
$uploaded_filename = $output->data->uploaded_filename; $uploaded_filename = $output->data->uploaded_filename;
// Call a trigger (before) // Call a trigger (before)
$trigger_obj = $output->data; $trigger_obj = $output->data;
$output = ModuleHandler::triggerCall('file.deleteFile', 'before', $trigger_obj); $output = ModuleHandler::triggerCall('file.deleteFile', 'before', $trigger_obj);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Remove from the DB // Remove from the DB
$output = executeQuery('file.deleteFile', $args); $output = executeQuery('file.deleteFile', $args);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Call a trigger (after) // Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj); $trigger_output = ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj);
if(!$trigger_output->toBool()) return $trigger_output; if(!$trigger_output->toBool()) return $trigger_output;
// If successfully deleted, remove the file // If successfully deleted, remove the file
FileHandler::removeFile($uploaded_filename); FileHandler::removeFile($uploaded_filename);
} }

View file

@ -418,7 +418,7 @@ class importerAdminController extends importer
unset($obj->extra_vars); unset($obj->extra_vars);
$obj->extra_vars = serialize($extra_vars); $obj->extra_vars = serialize($extra_vars);
// Check if the same nickname is existing // Check if the same nickname is existing
$nick_args = null; $nick_args = new stdClass;
$nick_args->nick_name = $obj->nick_name; $nick_args->nick_name = $obj->nick_name;
$nick_output = executeQuery('member.getMemberSrl', $nick_args); $nick_output = executeQuery('member.getMemberSrl', $nick_args);
if(!$nick_output->toBool()) $obj->nick_name .= '_'.$obj->member_srl; if(!$nick_output->toBool()) $obj->nick_name .= '_'.$obj->member_srl;
@ -767,7 +767,7 @@ class importerAdminController extends importer
$tag_count = count($tag_list); $tag_count = count($tag_list);
for($i=0;$i<$tag_count;$i++) for($i=0;$i<$tag_count;$i++)
{ {
$args = null; $args = new stdClass;
$args->tag_srl = getNextSequence(); $args->tag_srl = getNextSequence();
$args->module_srl = $module_srl; $args->module_srl = $module_srl;
$args->document_srl = $obj->document_srl; $args->document_srl = $obj->document_srl;
@ -947,7 +947,7 @@ class importerAdminController extends importer
} }
} }
// Comment list first // Comment list first
$list_args = null; $list_args = new stdClass;
$list_args->comment_srl = $obj->comment_srl; $list_args->comment_srl = $obj->comment_srl;
$list_args->document_srl = $obj->document_srl; $list_args->document_srl = $obj->document_srl;
$list_args->module_srl = $obj->module_srl; $list_args->module_srl = $obj->module_srl;

View file

@ -264,7 +264,7 @@ class ttimport
$tag_count = count($tag_list); $tag_count = count($tag_list);
for($i=0;$i<$tag_count;$i++) for($i=0;$i<$tag_count;$i++)
{ {
$args = null; $args = new stdClass;
$args->tag_srl = getNextSequence(); $args->tag_srl = getNextSequence();
$args->module_srl = $module_srl; $args->module_srl = $module_srl;
$args->document_srl = $obj->document_srl; $args->document_srl = $obj->document_srl;
@ -659,7 +659,7 @@ class ttimport
$tobj->sequence = $sequence; $tobj->sequence = $sequence;
$tobj->parent_srl = $parent_srl; $tobj->parent_srl = $parent_srl;
// Comment list first // Comment list first
$list_args = null; $list_args = new stdClass;
$list_args->comment_srl = $tobj->comment_srl; $list_args->comment_srl = $tobj->comment_srl;
$list_args->document_srl = $tobj->document_srl; $list_args->document_srl = $tobj->document_srl;
$list_args->module_srl = $tobj->module_srl; $list_args->module_srl = $tobj->module_srl;

View file

@ -1535,7 +1535,7 @@ class menuAdminController extends menu
$args->group_srls = $exposure; $args->group_srls = $exposure;
} }
$args->group_srls = implode(',', $exposure); if($exposure) $args->group_srls = implode(',', $exposure);
} }
$output = executeQuery('menu.updateMenuItem', $args); $output = executeQuery('menu.updateMenuItem', $args);

View file

@ -176,7 +176,7 @@ class moduleAdminController extends module
$errorLog = array(); $errorLog = array();
foreach($clones as $mid => $browser_title) foreach($clones as $mid => $browser_title)
{ {
$clone_args = null; $clone_args = new stdClass;
$clone_args = clone $module_info; $clone_args = clone $module_info;
$clone_args->module_srl = null; $clone_args->module_srl = null;
$clone_args->content = null; $clone_args->content = null;

View file

@ -572,7 +572,7 @@ class module extends ModuleObject
{ {
if($data->count == 1) continue; if($data->count == 1) continue;
$domain = $data->domain; $domain = $data->domain;
$args = null; $args = new stdClass;
$args->domain = $domain; $args->domain = $domain;
$output2 = executeQueryArray("module.getSiteByDomain", $args); $output2 = executeQueryArray("module.getSiteByDomain", $args);
$bFirst = true; $bFirst = true;
@ -584,7 +584,7 @@ class module extends ModuleObject
continue; continue;
} }
$domain .= "_"; $domain .= "_";
$args = null; $args = new stdClass;
$args->domain = $domain; $args->domain = $domain;
$args->site_srl = $site->site_srl; $args->site_srl = $site->site_srl;
$output3 = executeQuery("module.updateSite", $args); $output3 = executeQuery("module.updateSite", $args);

View file

@ -58,7 +58,7 @@ class moduleModel extends module
function getSiteInfoByDomain($domain, $columnList = array()) function getSiteInfoByDomain($domain, $columnList = array())
{ {
$args = new stdClass(); $args = new stdClass();
$args->domain= $domain; $args->domain = $domain;
$output = executeQuery('module.getSiteInfoByDomain', $args, $columnList); $output = executeQuery('module.getSiteInfoByDomain', $args, $columnList);
return $output->data; return $output->data;
} }