mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
issue 2119. supporting php 5.4. modules and widgets.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12706 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ff75082eee
commit
8a7c28babc
90 changed files with 572 additions and 83 deletions
|
|
@ -115,6 +115,7 @@ class moduleAdminController extends module
|
|||
$columnList = array('module', 'module_category_srl', 'layout_srl', 'use_mobile', 'mlayout_srl', 'menu_srl', 'site_srl', 'skin', 'mskin', 'description', 'mcontent', 'open_rss', 'header_text', 'footer_text', 'regdate');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
// Get permission information
|
||||
$module_args = new stdClass();
|
||||
$module_args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleGrants', $module_args);
|
||||
$grant = array();
|
||||
|
|
@ -124,10 +125,12 @@ class moduleAdminController extends module
|
|||
}
|
||||
|
||||
// get Extra Vars
|
||||
$extra_args = new stdClass();
|
||||
$extra_args->module_srl = $module_srl;
|
||||
$extra_output = executeQueryArray('module.getModuleExtraVars', $extra_args);
|
||||
if($extra_output->toBool() && is_array($extra_output->data))
|
||||
{
|
||||
$extra_vars = new stdClass();
|
||||
foreach($extra_output->data as $info)
|
||||
{
|
||||
$extra_vars->{$info->name} = $info->value;
|
||||
|
|
@ -156,6 +159,7 @@ class moduleAdminController extends module
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
// Copy a module
|
||||
$triggerObj = new stdClass();
|
||||
$triggerObj->originModuleSrl = $module_srl;
|
||||
$triggerObj->moduleSrlList = array();
|
||||
|
||||
|
|
@ -275,7 +279,9 @@ class moduleAdminController extends module
|
|||
|
||||
$grant_list = $xml_info->grant;
|
||||
|
||||
$grant_list->access = new stdClass();
|
||||
$grant_list->access->default = 'guest';
|
||||
$grant_list->manager = new stdClass();
|
||||
$grant_list->manager->default = 'manager';
|
||||
|
||||
foreach($grant_list as $grant_name => $grant_info)
|
||||
|
|
@ -305,6 +311,7 @@ class moduleAdminController extends module
|
|||
}
|
||||
|
||||
// Stored in the DB
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('module.deleteModuleGrants', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -315,7 +322,7 @@ class moduleAdminController extends module
|
|||
{
|
||||
foreach($group_srls as $key => $val)
|
||||
{
|
||||
$args = null;
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->name = $grant_name;
|
||||
$args->group_srl = $val;
|
||||
|
|
@ -532,7 +539,9 @@ class moduleAdminController extends module
|
|||
$xml_info = $oModuleModel->getModuleActionXml($module_info->module);
|
||||
$grant_list = $xml_info->grant;
|
||||
|
||||
$grant_list->access = new stdClass();
|
||||
$grant_list->access->default = 'guest';
|
||||
$grant_list->manager = new stdClass();
|
||||
$grant_list->manager->default = 'manager';
|
||||
|
||||
foreach($grant_list as $grant_name => $grant_info)
|
||||
|
|
@ -567,7 +576,7 @@ class moduleAdminController extends module
|
|||
// Stored in the DB
|
||||
foreach($modules as $module_srl)
|
||||
{
|
||||
$args = null;
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('module.deleteModuleGrants', $args);
|
||||
if(!$output->toBool()) continue;
|
||||
|
|
@ -576,7 +585,7 @@ class moduleAdminController extends module
|
|||
{
|
||||
foreach($group_srls as $key => $val)
|
||||
{
|
||||
$args = null;
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->name = $grant_name;
|
||||
$args->group_srl = $val;
|
||||
|
|
@ -614,6 +623,7 @@ class moduleAdminController extends module
|
|||
$site_module_info = Context::get('site_module_info');
|
||||
$target = Context::get('target');
|
||||
$module = Context::get('module');
|
||||
$args = new stdClass();
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->name = str_replace(' ','_',Context::get('lang_code'));
|
||||
$args->lang_name = str_replace(' ','_',Context::get('lang_name'));
|
||||
|
|
@ -664,6 +674,7 @@ class moduleAdminController extends module
|
|||
{
|
||||
// Get language code
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args = new stdClass();
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->name = str_replace(' ','_',Context::get('name'));
|
||||
$args->lang_name = str_replace(' ','_',Context::get('lang_name'));
|
||||
|
|
@ -794,6 +805,8 @@ class moduleAdminController extends module
|
|||
*/
|
||||
function makeCacheDefinedLangCode($site_srl = 0)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
||||
// Get the language file of the current site
|
||||
if(!$site_srl)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue