mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +09:00
NOISSUE PHP 5.4 이상 호환성 개선.
This commit is contained in:
parent
742af78932
commit
41ff8ace3b
32 changed files with 365 additions and 113 deletions
|
|
@ -74,6 +74,7 @@ class moduleAdminController extends module
|
|||
*/
|
||||
function doDeleteModuleCategory()
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_category_srl = Context::get('module_category_srl');
|
||||
return executeQuery('module.deleteModuleCategory', $args);
|
||||
}
|
||||
|
|
@ -579,6 +580,8 @@ class moduleAdminController extends module
|
|||
$grant_list->manager = new stdClass();
|
||||
$grant_list->manager->default = 'manager';
|
||||
|
||||
$grant = new stdClass;
|
||||
|
||||
foreach($grant_list as $grant_name => $grant_info)
|
||||
{
|
||||
// Get the default value
|
||||
|
|
@ -736,8 +739,9 @@ class moduleAdminController extends module
|
|||
$site_keyword = Context::get('site_keyword');
|
||||
$site_srl = Context::get('site_srl');
|
||||
$vid = Context::get('vid');
|
||||
|
||||
// If there is no site keyword, use as information of the current virtual site
|
||||
$args = null;
|
||||
$args = new stdClass;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
if($site_keyword) $args->site_keyword = $site_keyword;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class moduleAdminModel extends module
|
|||
{
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
$args = new stdClass;
|
||||
$args->module_srls = Context::get('module_srls');
|
||||
$output = executeQueryArray('module.getModulesInfo', $args);
|
||||
if(!$output->toBool() || !$output->data) return new Object();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class module extends ModuleObject
|
|||
FileHandler::makeDir('./files/cache/module_info');
|
||||
FileHandler::makeDir('./files/cache/triggers');
|
||||
FileHandler::makeDir('./files/ruleset');
|
||||
|
||||
// Insert site information into the sites table
|
||||
$args = new stdClass;
|
||||
$args->site_srl = 0;
|
||||
$output = $oDB->executeQuery('module.getSite', $args);
|
||||
if(!$output->data || !$output->data->index_module_srl)
|
||||
|
|
@ -31,6 +33,8 @@ 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 = 0;
|
||||
$site_args->domain = $domain;
|
||||
|
|
@ -320,7 +324,9 @@ class module extends ModuleObject
|
|||
if(!$oDB->isColumnExists("documents","extra_vars".$i)) continue;
|
||||
$oDB->dropColumn('documents','extra_vars'.$i);
|
||||
}
|
||||
|
||||
// Enter the main site information sites on the table
|
||||
$args = new stdClass;
|
||||
$args->site_srl = 0;
|
||||
$output = $oDB->executeQuery('module.getSite', $args);
|
||||
if(!$output->data)
|
||||
|
|
@ -402,7 +408,7 @@ class module extends ModuleObject
|
|||
$output = executeQuery('module.updateMobileSkinFixModules');
|
||||
}
|
||||
|
||||
unset($args);
|
||||
$args = new stdClass;
|
||||
$args->site_srl = 0;
|
||||
$output = executeQueryArray('module.getNotLinkedModuleBySiteSrl',$args);
|
||||
|
||||
|
|
@ -413,11 +419,11 @@ class module extends ModuleObject
|
|||
$menuSrl = $args->menu_srl = getNextSequence();
|
||||
$args->listorder = $args->menu_srl * -1;
|
||||
|
||||
$ioutput = executeQuery('menu.insertMenu', $args);
|
||||
$output = executeQuery('menu.insertMenu', $args);
|
||||
|
||||
if(!$ioutput->toBool())
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $ioutput;
|
||||
return $output;
|
||||
}
|
||||
|
||||
//getNotLinkedModuleBySiteSrl
|
||||
|
|
@ -433,6 +439,7 @@ class module extends ModuleObject
|
|||
$output = executeQuery('module.updateMobileSkinFixModules');
|
||||
|
||||
$oModuleController = getController('module');
|
||||
if(!isset($moduleConfig)) $moduleConfig = new stdClass;
|
||||
$moduleConfig->isUpdateFixedValue = TRUE;
|
||||
$output = $oModuleController->updateModuleConfig('module', $moduleConfig);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class moduleController extends module
|
|||
$cache_file = './files/config/module_extend.php';
|
||||
FileHandler::removeFile($cache_file);
|
||||
|
||||
$args = new stdClass;
|
||||
$args->parent_module = $parent_module;
|
||||
$args->extend_module = $extend_module;
|
||||
$args->type = $type;
|
||||
|
|
@ -139,6 +140,7 @@ class moduleController extends module
|
|||
$cache_file = './files/config/module_extend.php';
|
||||
FileHandler::removeFile($cache_file);
|
||||
|
||||
$args = new stdClass;
|
||||
$args->parent_module = $parent_module;
|
||||
$args->extend_module = $extend_module;
|
||||
$args->type = $type;
|
||||
|
|
@ -158,6 +160,8 @@ class moduleController extends module
|
|||
$oModuleModel = &getModel('module');
|
||||
$origin_config = $oModuleModel->getModuleConfig($module, $site_srl);
|
||||
|
||||
if(!isset($origin_config)) $origin_config = new stdClass;
|
||||
|
||||
foreach($config as $key => $val)
|
||||
{
|
||||
$origin_config->{$key} = $val;
|
||||
|
|
@ -233,6 +237,7 @@ class moduleController extends module
|
|||
$domain = strtolower($domain);
|
||||
}
|
||||
|
||||
$args = new stdClass;
|
||||
$args->site_srl = getNextSequence();
|
||||
$args->domain = (substr_compare($domain, '/', -1) === 0) ? substr($domain, 0, -1) : $domain;
|
||||
$args->index_module_srl = $index_module_srl;
|
||||
|
|
@ -399,6 +404,7 @@ class moduleController extends module
|
|||
|
||||
if($isMenuCreate == TRUE)
|
||||
{
|
||||
$menuArgs = new stdClass;
|
||||
$menuArgs->menu_srl = $args->menu_srl;
|
||||
$menuOutput = executeQuery('menu.getMenu', $menuArgs);
|
||||
|
||||
|
|
@ -410,10 +416,11 @@ class moduleController extends module
|
|||
|
||||
if(!$tempMenu)
|
||||
{
|
||||
$siteMapOutput->site_srl = 0;
|
||||
$siteMapArgs = new stdClass;
|
||||
$siteMapArgs->site_srl = 0;
|
||||
$siteMapArgs->title = 'Temporary menu';
|
||||
$tempMenu->menu_srl = $siteMapArgs->menu_srl = getNextSequence();
|
||||
$siteMapArgs->listorder = $siteMapArgs->menu_srl * -1;
|
||||
$tempMenu->menu_srl = $siteMapArgs->menu_srl = getNextSequence();
|
||||
|
||||
$siteMapOutput = executeQuery('menu.insertMenu', $siteMapArgs);
|
||||
if(!$siteMapOutput->toBool())
|
||||
|
|
@ -530,6 +537,7 @@ class moduleController extends module
|
|||
return $output;
|
||||
}
|
||||
|
||||
$menuArgs = new stdClass;
|
||||
$menuArgs->url = $module_info->mid;
|
||||
$menuArgs->site_srl = $module_info->site_srl;
|
||||
$menuOutput = executeQuery('menu.getMenuItemByUrl', $menuArgs);
|
||||
|
|
@ -581,6 +589,7 @@ class moduleController extends module
|
|||
*/
|
||||
function updateModuleSite($module_srl, $site_srl, $layout_srl = 0)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
$args->site_srl = $site_srl;
|
||||
$args->layout_srl = $layout_srl;
|
||||
|
|
@ -600,6 +609,7 @@ class moduleController extends module
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
$output = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
|
||||
$args = new stdClass();
|
||||
$args->url = $output->mid;
|
||||
$args->is_shortcut = 'N';
|
||||
|
|
@ -626,6 +636,7 @@ class moduleController extends module
|
|||
if($output->data)
|
||||
{
|
||||
unset($args);
|
||||
$args = new stdClass;
|
||||
$args->menu_srl = $output->data->menu_srl;
|
||||
$args->menu_item_srl = $output->data->menu_item_srl;
|
||||
$args->is_force = 'N';
|
||||
|
|
@ -750,6 +761,7 @@ class moduleController extends module
|
|||
{
|
||||
if(!count($menu_srl_list)) return;
|
||||
|
||||
$args = new stdClass;
|
||||
$args->layout_srl = $layout_srl;
|
||||
$args->menu_srls = implode(',',$menu_srl_list);
|
||||
$output = executeQuery('module.updateModuleLayout', $args);
|
||||
|
|
@ -762,6 +774,7 @@ class moduleController extends module
|
|||
function insertSiteAdmin($site_srl, $arr_admins)
|
||||
{
|
||||
// Remove the site administrator
|
||||
$args = new stdClass;
|
||||
$args->site_srl = $site_srl;
|
||||
|
||||
$output = executeQuery('module.deleteSiteAdmin', $args);
|
||||
|
|
@ -792,6 +805,7 @@ class moduleController extends module
|
|||
foreach($output->data as $key => $val)
|
||||
{
|
||||
unset($args);
|
||||
$args = new stdClass;
|
||||
$args->site_srl = $site_srl;
|
||||
$args->member_srl = $val->member_srl;
|
||||
$output = executeQueryArray('module.insertSiteAdmin', $args);
|
||||
|
|
@ -877,6 +891,7 @@ class moduleController extends module
|
|||
|
||||
if(!$obj || !count($obj)) return new Object();
|
||||
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
foreach($obj as $key => $val)
|
||||
{
|
||||
|
|
@ -1153,6 +1168,7 @@ class moduleController extends module
|
|||
*/
|
||||
function updateModuleFileBox($vars)
|
||||
{
|
||||
$args = new stdClass;
|
||||
// have file
|
||||
if($vars->addfile['tmp_name'] && is_uploaded_file($vars->addfile['tmp_name']))
|
||||
{
|
||||
|
|
@ -1182,6 +1198,8 @@ class moduleController extends module
|
|||
$args->module_filebox_srl = $vars->module_filebox_srl;
|
||||
$args->comment = $vars->comment;
|
||||
|
||||
// FIXME $args ??
|
||||
|
||||
return executeQuery('module.updateModuleFileBox', $vars);
|
||||
}
|
||||
|
||||
|
|
@ -1211,6 +1229,7 @@ class moduleController extends module
|
|||
}
|
||||
|
||||
// insert
|
||||
$args = new stdClass;
|
||||
$args->module_filebox_srl = $vars->module_filebox_srl;
|
||||
$args->member_srl = $vars->member_srl;
|
||||
$args->comment = $vars->comment;
|
||||
|
|
@ -1258,6 +1277,7 @@ class moduleController extends module
|
|||
function lock($lock_name, $timeout, $member_srl = null)
|
||||
{
|
||||
$this->unlockTimeoutPassed();
|
||||
$args = new stdClass;
|
||||
$args->lock_name = $lock_name;
|
||||
if(!$timeout) $timeout = 60;
|
||||
$args->deadline = date("YmdHis", $_SERVER['REQUEST_TIME'] + $timeout);
|
||||
|
|
@ -1278,6 +1298,7 @@ class moduleController extends module
|
|||
|
||||
function unlock($lock_name, $deadline)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->lock_name = $lock_name;
|
||||
$args->deadline = $deadline;
|
||||
$output = executeQuery('module.deleteLock', $args);
|
||||
|
|
@ -1286,6 +1307,7 @@ class moduleController extends module
|
|||
|
||||
function updateModuleInSites($site_srls, $args)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->site_srls = $site_srls;
|
||||
$output = executeQuery('module.updateModuleInSites', $args);
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ class moduleModel extends module
|
|||
$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;
|
||||
|
|
@ -383,6 +385,7 @@ class moduleModel extends module
|
|||
function getModulesInfoByLayout($layout_srl, $columnList = array())
|
||||
{
|
||||
// Imported data
|
||||
$args = new stdClass;
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQueryArray('module.getModulesByLayout', $args, $columnList);
|
||||
|
||||
|
|
@ -487,6 +490,7 @@ class moduleModel extends module
|
|||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->mid = $mid;
|
||||
if($site_module_info) $args->site_srl = $site_module_info->site_srl;
|
||||
$output = executeQuery('module.getModuleSrlByMid', $args);
|
||||
|
|
@ -740,6 +744,7 @@ class moduleModel extends module
|
|||
else $grant_list[] = $grants;
|
||||
|
||||
$info->grant = new stdClass();
|
||||
$buff[] = '$info->grant = new stdClass;';
|
||||
foreach($grant_list as $grant)
|
||||
{
|
||||
$name = $grant->attrs->name;
|
||||
|
|
@ -1228,6 +1233,7 @@ class moduleModel extends module
|
|||
*/
|
||||
function getModuleCount($site_srl, $module = null)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->site_srl = $site_srl;
|
||||
if(!is_null($module)) $args->module = $module;
|
||||
$output = executeQuery('module.getModuleCount', $args);
|
||||
|
|
@ -1350,6 +1356,7 @@ class moduleModel extends module
|
|||
function getModuleCategory($module_category_srl)
|
||||
{
|
||||
// Get data from the DB
|
||||
$args = new stdClass;
|
||||
$args->module_category_srl = $module_category_srl;
|
||||
$output = executeQuery('module.getModuleCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -1559,6 +1566,7 @@ class moduleModel extends module
|
|||
*/
|
||||
function getSiteAdmin($site_srl)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQueryArray('module.getSiteAdmin', $args);
|
||||
return $output->data;
|
||||
|
|
@ -1763,6 +1771,7 @@ class moduleModel extends module
|
|||
}
|
||||
if(!$output)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_info->module_srl;
|
||||
$output = executeQueryArray('module.getModuleMobileSkinVars',$args);
|
||||
//insert in cache
|
||||
|
|
@ -1833,6 +1842,7 @@ class moduleModel extends module
|
|||
}
|
||||
else
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleGrants', $args);
|
||||
}
|
||||
|
|
@ -2061,6 +2071,7 @@ class moduleModel extends module
|
|||
|
||||
$requestVars = Context::getRequestVars();
|
||||
|
||||
$args = new stdClass;
|
||||
$args->site_srl = (int)$requestVars->site_srl;
|
||||
$args->page = 1; // /< Page
|
||||
$args->list_count = 100; // /< the number of posts to display on a single page
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue