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

View file

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

View file

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

View file

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

View file

@ -264,7 +264,7 @@ class ttimport
$tag_count = count($tag_list);
for($i=0;$i<$tag_count;$i++)
{
$args = null;
$args = new stdClass;
$args->tag_srl = getNextSequence();
$args->module_srl = $module_srl;
$args->document_srl = $obj->document_srl;
@ -659,7 +659,7 @@ class ttimport
$tobj->sequence = $sequence;
$tobj->parent_srl = $parent_srl;
// Comment list first
$list_args = null;
$list_args = new stdClass;
$list_args->comment_srl = $tobj->comment_srl;
$list_args->document_srl = $tobj->document_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 = implode(',', $exposure);
if($exposure) $args->group_srls = implode(',', $exposure);
}
$output = executeQuery('menu.updateMenuItem', $args);

View file

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

View file

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