mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix uninitialized stdClass in rarely used method
This commit is contained in:
parent
3bd25f9538
commit
508b6ed340
24 changed files with 68 additions and 19 deletions
|
|
@ -275,6 +275,7 @@ class commentModel extends comment
|
|||
*/
|
||||
function getCommentCountByDate($date = '', $moduleSrlList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
if($date)
|
||||
{
|
||||
$args->regDate = date('Ymd', strtotime($date));
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ class counterController extends counter
|
|||
$args->site_srl = $site_srl;
|
||||
$query_id = 'counter.insertSiteTodayStatus';
|
||||
|
||||
$u_args = new stdClass();
|
||||
$u_args->site_srl = $site_srl; // /< when inserting a daily row, attempt to inser total rows(where regdate=0) together
|
||||
executeQuery($query_id, $u_args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ class counterModel extends counter
|
|||
$max = 0;
|
||||
$sum = 0;
|
||||
|
||||
$status = new stdClass();
|
||||
switch($type)
|
||||
{
|
||||
case 'year' :
|
||||
|
|
|
|||
|
|
@ -495,6 +495,7 @@ class documentAdminController extends document
|
|||
|
||||
if($document_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('document.deleteDeclaredDocuments', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -578,7 +579,7 @@ class documentAdminController extends document
|
|||
|
||||
$this->setMessage('success_registed');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispDocumentAdminAlias', 'document_srl', $args->document_srl);
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispDocumentAdminAlias');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
|
|
@ -705,6 +706,7 @@ class documentAdminController extends document
|
|||
{
|
||||
$document_srl = Context::get('document_srl');
|
||||
$alias_srl = Context::get('target_srl');
|
||||
$args = new stdClass();
|
||||
$args->alias_srl = $alias_srl;
|
||||
$output = executeQuery("document.deleteAlias", $args);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class documentAdminModel extends document
|
|||
unset($obj->mid);
|
||||
}
|
||||
// check if the module_srl is an array
|
||||
$args = new stdClass();
|
||||
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
|
||||
else $args->module_srl = $obj->module_srl;
|
||||
// Variable check
|
||||
|
|
@ -81,6 +82,7 @@ class documentAdminModel extends document
|
|||
*/
|
||||
function getDocumentTrash($trash_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->trash_srl = $trash_srl;
|
||||
$output = executeQuery('document.getTrash', $args);
|
||||
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ class documentAdminView extends document
|
|||
*/
|
||||
function dispDocumentAdminAlias()
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = Context::get('document_srl');
|
||||
if(!$args->document_srl) return $this->dispDocumentAdminList();
|
||||
|
||||
|
|
@ -268,6 +269,7 @@ class documentAdminView extends document
|
|||
function dispDocumentAdminTrashList()
|
||||
{
|
||||
// options for a list
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< the number of posts to display on a single page
|
||||
$args->page_count = 10; // /< the number of pages that appear in the page navigation
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ class document extends ModuleObject
|
|||
if(!$oDB->isColumnExists("documents","lang_code"))
|
||||
{
|
||||
$oDB->addColumn('documents',"lang_code","varchar",10, config('locale.default_lang'));
|
||||
$obj = new stdClass();
|
||||
$obj->lang_code = config('locale.default_lang');
|
||||
executeQuery('document.updateDocumentsLangCode', $obj);
|
||||
}
|
||||
|
|
@ -234,6 +235,7 @@ class document extends ModuleObject
|
|||
$output = executeQuery('document.getGroupsExtraKeys', $obj);
|
||||
if($output->toBool() && $output->data && count($output->data)) {
|
||||
foreach($output->data as $extra_keys) {
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $extra_keys->module_srl;
|
||||
$args->var_idx = $extra_keys->idx;
|
||||
$args->new_eid = "extra_vars".$extra_keys->idx;
|
||||
|
|
@ -245,12 +247,14 @@ class document extends ModuleObject
|
|||
if(!$oDB->isColumnExists("document_extra_vars","eid"))
|
||||
{
|
||||
$oDB->addColumn("document_extra_vars","eid","varchar",40);
|
||||
$obj = new stdClass();
|
||||
$obj->var_idx = '-1,-2';
|
||||
$output = executeQuery('document.getGroupsExtraVars', $obj);
|
||||
if($output->toBool() && $output->data && count($output->data))
|
||||
{
|
||||
foreach($output->data as $extra_vars)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $extra_vars->module_srl;
|
||||
$args->var_idx = $extra_vars->idx;
|
||||
$args->new_eid = "extra_vars".$extra_vars->idx;
|
||||
|
|
@ -272,6 +276,7 @@ class document extends ModuleObject
|
|||
if(!$oDB->isColumnExists('documents', 'status'))
|
||||
{
|
||||
$oDB->addColumn('documents', 'status', 'varchar', 20, 'PUBLIC');
|
||||
$args = new stdClass();
|
||||
$args->is_secret = 'Y';
|
||||
$output = executeQuery('document.updateDocumentStatus', $args);
|
||||
}
|
||||
|
|
@ -284,7 +289,7 @@ class document extends ModuleObject
|
|||
if($oDB->isColumnExists('documents', 'allow_comment') || $oDB->isColumnExists('documents', 'lock_comment'))
|
||||
{
|
||||
$oDB->addColumn('documents', 'comment_status', 'varchar', 20, 'ALLOW');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->commentStatus = 'DENY';
|
||||
|
||||
// allow_comment='Y', lock_comment='Y'
|
||||
|
|
|
|||
|
|
@ -2522,6 +2522,7 @@ class documentController extends document
|
|||
}
|
||||
else if($type == 'cancelDeclare')
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl_list;
|
||||
$output = executeQuery('document.deleteDeclaredDocuments', $args);
|
||||
$msg_code = 'success_declare_canceled';
|
||||
|
|
|
|||
|
|
@ -582,6 +582,7 @@ class documentModel extends document
|
|||
function getDocumentExtraVarsCount($module_srl, $search_obj = NULL)
|
||||
{
|
||||
// Additional search options
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
$args->category_srl = $search_obj->category_srl;
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ class editorController extends editor
|
|||
*/
|
||||
function removeEditorConfig($site_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('editor.deleteSiteComponent', $args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,10 +132,17 @@ class fileAdminModel extends file
|
|||
*/
|
||||
function getFilesCountByDate($date = '')
|
||||
{
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
$args = new stdClass();
|
||||
if($date)
|
||||
{
|
||||
$args->regDate = date('Ymd', strtotime($date));
|
||||
}
|
||||
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
if(!$output->toBool()) return 0;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $output->data->count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ class importerAdminController extends importer
|
|||
$total_count = 0;
|
||||
foreach ($output->data as $val)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->user_id = $val->user_id;
|
||||
$args->member_srl = $val->member_srl;
|
||||
$tmp = executeQuery ('importer.updateDocumentSyncForCUBRID'.$postFix, $args);
|
||||
|
|
@ -145,6 +146,7 @@ class importerAdminController extends importer
|
|||
$total_count = 0;
|
||||
foreach ($output->data as $val)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->user_id = $val->user_id;
|
||||
$args->member_srl = $val->member_srl;
|
||||
$tmp = executeQuery ('importer.updateCommentSyncForCUBRID'.$postFix, $args);
|
||||
|
|
@ -516,7 +518,7 @@ class importerAdminController extends importer
|
|||
FileHandler::removeFile($target_file);
|
||||
if(!$xmlObj) continue;
|
||||
// List objects
|
||||
$obj = null;
|
||||
$obj = new stdClass();
|
||||
$obj->receiver = base64_decode($xmlObj->message->receiver->body);
|
||||
$obj->sender = base64_decode($xmlObj->message->sender->body);
|
||||
$obj->title = base64_decode($xmlObj->message->title->body);
|
||||
|
|
@ -526,25 +528,26 @@ class importerAdminController extends importer
|
|||
$obj->readed_date = base64_decode($xmlObj->message->readed_date->body);
|
||||
// Get member_srl of sender/recipient (If not exists, pass)
|
||||
if(!$obj->sender) continue;
|
||||
$sender_args = new stdClass();
|
||||
$sender_args->user_id = $obj->sender;
|
||||
$sender_output = executeQuery('member.getMemberInfo',$sender_args);
|
||||
$sender_srl = $sender_output->data->member_srl;
|
||||
if(!$sender_srl)
|
||||
{
|
||||
unset($sender_args);
|
||||
$sender_args = new stdClass();
|
||||
$sender_args->email_address = $obj->sender;
|
||||
$sender_output = executeQuery('member.getMemberInfoByEmailAddress',$sender_args);
|
||||
$sender_srl = $sender_output->data->member_srl;
|
||||
}
|
||||
if(!$sender_srl) continue;
|
||||
|
||||
$receiver_args = new stdClass();
|
||||
$receiver_args->user_id = $obj->receiver;
|
||||
if(!$obj->receiver) continue;
|
||||
$receiver_output = executeQuery('member.getMemberInfo',$receiver_args);
|
||||
$receiver_srl = $receiver_output->data->member_srl;
|
||||
if(!$receiver_srl)
|
||||
{
|
||||
unset($receiver_args);
|
||||
$receiver_args = new stdClass();
|
||||
$receiver_args->email_address = $obj->receiver;
|
||||
$receiver_output = executeQuery('member.getMemberInfoByEmailAddress',$receiver_args);
|
||||
$receiver_srl = $receiver_output->data->member_srl;
|
||||
|
|
@ -645,6 +648,7 @@ class importerAdminController extends importer
|
|||
$category_list = $oDocumentModel->getCategoryList($module_srl);
|
||||
if(count($category_list)) foreach($category_list as $key => $val) $category_titles[$val->title] = $val->category_srl;
|
||||
|
||||
$ek_args = new stdClass();
|
||||
$ek_args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('document.getDocumentExtraKeys', $ek_args);
|
||||
if($output->data)
|
||||
|
|
@ -783,7 +787,7 @@ class importerAdminController extends importer
|
|||
foreach($extra_vars as $key => $val)
|
||||
{
|
||||
if(!$val->value) continue;
|
||||
unset($e_args);
|
||||
$e_args = new stdClass;
|
||||
$e_args->module_srl = $module_srl;
|
||||
$e_args->document_srl = $obj->document_srl;
|
||||
$e_args->var_idx = $val->var_idx;
|
||||
|
|
@ -793,7 +797,7 @@ class importerAdminController extends importer
|
|||
// Create a key for extra vars if not exists (except vars for title and content)
|
||||
if(!preg_match('/^(title|content)_(.+)$/i',$e_args->eid) && !$extra_keys[$e_args->eid])
|
||||
{
|
||||
unset($ek_args);
|
||||
$ek_args = new stdClass();
|
||||
$ek_args->module_srl = $module_srl;
|
||||
$ek_args->var_idx = $val->var_idx;
|
||||
$ek_args->var_name = $val->eid;
|
||||
|
|
@ -962,6 +966,7 @@ class importerAdminController extends importer
|
|||
else
|
||||
{
|
||||
// Get parent comment infomation
|
||||
$parent_args = new stdClass();
|
||||
$parent_args->comment_srl = $obj->parent_srl;
|
||||
$parent_output = executeQuery('comment.getCommentListItem', $parent_args);
|
||||
// Return if parent comment doesn't exist
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ class ttimport
|
|||
|
||||
if($module_name == 'textyle')
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $obj->document_srl;
|
||||
$args->module_srl = $obj->module_srl;
|
||||
$args->logs = serialize(null);
|
||||
|
|
@ -674,6 +675,7 @@ class ttimport
|
|||
else
|
||||
{
|
||||
// Get parent_srl
|
||||
$parent_args = new stdClass();
|
||||
$parent_args->comment_srl = $tobj->parent_srl;
|
||||
$parent_output = executeQuery('comment.getCommentListItem', $parent_args);
|
||||
// Return if parent comment doesn't exist
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class layoutAdminController extends layout
|
|||
|
||||
// Get information to create a layout
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args = new stdClass();
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->layout_srl = getNextSequence();
|
||||
$args->layout = Context::get('layout');
|
||||
|
|
@ -981,7 +982,7 @@ class layoutAdminController extends layout
|
|||
}
|
||||
|
||||
unset($newLayoutInfo->{$name});
|
||||
|
||||
$args = new stdClass();
|
||||
$args->layout_srl = $layoutSrl;
|
||||
$args->extra_vars = serialize($newLayoutInfo);
|
||||
$output = $this->updateLayout($args);
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ class layout extends ModuleObject
|
|||
$oDB->addColumn('layouts','layout_type','char',1,'P',true);
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->layout = '.';
|
||||
$output = executeQueryArray('layout.getLayoutDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ class memberAdminModel extends member
|
|||
*/
|
||||
function getSiteMemberList($site_srl, $page = 1)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$args->page = $page;
|
||||
$args->list_count = 40;
|
||||
|
|
@ -240,10 +241,17 @@ class memberAdminModel extends member
|
|||
*/
|
||||
function getMemberGroupMemberCountByDate($date = '')
|
||||
{
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
$args = new stdClass();
|
||||
if($date)
|
||||
{
|
||||
$args->regDate = date('Ymd', strtotime($date));
|
||||
}
|
||||
|
||||
$output = executeQuery('member.getMemberGroupMemberCountByDate', $args);
|
||||
if(!$output->toBool()) return 0;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return count($output->data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ class member extends ModuleObject {
|
|||
{
|
||||
$oDB->addColumn("member", "list_order", "number", 11);
|
||||
@set_time_limit(0);
|
||||
$args = new stdClass();
|
||||
$args->list_order = 'member_srl';
|
||||
executeQuery('member.updateMemberListOrderAll',$args);
|
||||
executeQuery('member.updateMemberListOrderAll');
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ class menuAdminController extends menu
|
|||
else
|
||||
{
|
||||
// create menu item.
|
||||
$item_args = new stdClass();
|
||||
$item_args->menu_srl = $menuSrl;
|
||||
$item_args->url = $moduleInfo->mid;
|
||||
$item_args->name = $moduleInfo->mid;
|
||||
|
|
@ -1466,6 +1467,7 @@ class menuAdminController extends menu
|
|||
}
|
||||
elseif($mode == 'insert')
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->menu_item_srl = $target_srl;
|
||||
$args->parent_srl = $parent_srl;
|
||||
$args->listorder = -1*getNextSequence();
|
||||
|
|
@ -2087,6 +2089,7 @@ class menuAdminController extends menu
|
|||
{
|
||||
if(!count($menu_srl_list)) return;
|
||||
// Delete the value of menu_srls
|
||||
$args = new stdClass();
|
||||
$args->menu_srls = implode(',',$menu_srl_list);
|
||||
$output = executeQuery('menu.deleteMenuLayout', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class menu extends ModuleObject
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$args = new stdClass();
|
||||
|
|
@ -95,7 +95,7 @@ class menu extends ModuleObject
|
|||
$menuItemAllList = array();
|
||||
foreach($output AS $key=>$value)
|
||||
{
|
||||
unset($args);
|
||||
$args = new stdClass();
|
||||
$args->menu_srl = $value->menu_srl;
|
||||
$output2 = executeQueryArray('menu.getMenuItems', $args);
|
||||
if(is_array($output2->data))
|
||||
|
|
@ -123,7 +123,7 @@ class menu extends ModuleObject
|
|||
$shortcutItemList = array_diff_assoc($menuItemAllList, $menuItemUniqueList);
|
||||
foreach($output AS $key=>$value)
|
||||
{
|
||||
unset($args);
|
||||
$args = new stdClass();
|
||||
$args->menu_srl = $value->menu_srl;
|
||||
$output2 = executeQueryArray('menu.getMenuItems', $args);
|
||||
if(is_array($output2->data))
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ class module extends ModuleObject
|
|||
$per_page = 100;
|
||||
$total_pages = (int) (($total_count - 1) / $per_page) + 1;
|
||||
// Get extra vars if exist
|
||||
$doc_args = null;
|
||||
$doc_args = new stdClass();
|
||||
$doc_args->module_srl = $module_srl;
|
||||
$doc_args->list_count = $per_page;
|
||||
$doc_args->sort_index = 'list_order';
|
||||
|
|
@ -326,6 +326,7 @@ class module extends ModuleObject
|
|||
$domain = Context::getDefaultUrl();
|
||||
$url_info = parse_url($domain);
|
||||
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
||||
$site_args = new stdClass();
|
||||
$site_args->site_srl = 0;
|
||||
$site_args->index_module_srl = $mid_output->data->module_srl;
|
||||
$site_args->domain = $domain;
|
||||
|
|
@ -382,7 +383,7 @@ class module extends ModuleObject
|
|||
if(count($skin_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/modules/%s', $skin_path[0], $skin_path[1])))
|
||||
{
|
||||
unset($args);
|
||||
$args = new stdClass();
|
||||
$args->skin = $item->skin;
|
||||
$args->new_skin = implode('|@|', $skin_path);
|
||||
$output = executeQuery('module.updateSkinAll', $args);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ class ncenterliteAdminController extends ncenterlite
|
|||
$output = executeQuery('ncenterlite.deleteNotifyAll', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ class pointController extends point
|
|||
// Pass if there are no requested points
|
||||
if(!$point) return new Object();
|
||||
// In case of a registered member, if it is read but cannot just pass, then get the current points
|
||||
$args = new stdClass();
|
||||
if($member_srl)
|
||||
{
|
||||
$args->member_srl = $member_srl;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ class sessionModel extends session
|
|||
|
||||
if(!count($member_srls)) return $output;
|
||||
|
||||
$member_args = new stdClass();
|
||||
$member_args->member_srl = implode(',',$member_srls);
|
||||
$member_output = executeQueryArray('member.getMembers', $member_args);
|
||||
if($member_output->data)
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ class spamfilterModel extends spamfilter
|
|||
$word = $word_list[$i]->word;
|
||||
if(preg_match('/'.preg_quote($word,'/').'/is', $text))
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->word = $word;
|
||||
$output = executeQuery('spamfilter.updateDeniedWordHit', $args);
|
||||
return new Object(-1,sprintf(lang('msg_alert_denied_word'), $word));
|
||||
|
|
@ -154,6 +155,7 @@ class spamfilterModel extends spamfilter
|
|||
{
|
||||
if(!$ipaddress) $ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$args = new stdClass();
|
||||
$args->ipaddress = $ipaddress;
|
||||
$args->regdate = date("YmdHis", $_SERVER['REQUEST_TIME']-$time);
|
||||
$output = executeQuery('spamfilter.getLogCount', $args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue