mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
NOISSUE PHP 버전 호환성 개선
This commit is contained in:
parent
0774d71e69
commit
2e419e2f39
4 changed files with 22 additions and 18 deletions
|
|
@ -305,12 +305,16 @@ class addonAdminModel extends addon
|
||||||
$addon_info->title = $xml_obj->title->body;
|
$addon_info->title = $xml_obj->title->body;
|
||||||
$addon_info->description = trim($xml_obj->author->description->body);
|
$addon_info->description = trim($xml_obj->author->description->body);
|
||||||
$addon_info->version = $xml_obj->attrs->version;
|
$addon_info->version = $xml_obj->attrs->version;
|
||||||
|
|
||||||
$date_obj = new stdClass();
|
$date_obj = new stdClass();
|
||||||
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
|
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||||
$addon_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
$addon_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||||
|
|
||||||
|
$author_obj = new stdClass();
|
||||||
$author_obj->name = $xml_obj->author->name->body;
|
$author_obj->name = $xml_obj->author->name->body;
|
||||||
$author_obj->email_address = $xml_obj->author->attrs->email_address;
|
$author_obj->email_address = $xml_obj->author->attrs->email_address;
|
||||||
$author_obj->homepage = $xml_obj->author->attrs->link;
|
$author_obj->homepage = $xml_obj->author->attrs->link;
|
||||||
|
|
||||||
$addon_info->author = array();
|
$addon_info->author = array();
|
||||||
$addon_info->author[] = $author_obj;
|
$addon_info->author[] = $author_obj;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,9 +138,9 @@ class moduleAdminController extends module
|
||||||
$extra_args = new stdClass();
|
$extra_args = new stdClass();
|
||||||
$extra_args->module_srl = $module_srl;
|
$extra_args->module_srl = $module_srl;
|
||||||
$extra_output = executeQueryArray('module.getModuleExtraVars', $extra_args);
|
$extra_output = executeQueryArray('module.getModuleExtraVars', $extra_args);
|
||||||
|
$extra_vars = new stdClass();
|
||||||
if($extra_output->toBool() && is_array($extra_output->data))
|
if($extra_output->toBool() && is_array($extra_output->data))
|
||||||
{
|
{
|
||||||
$extra_vars = new stdClass();
|
|
||||||
foreach($extra_output->data as $info)
|
foreach($extra_output->data as $info)
|
||||||
{
|
{
|
||||||
$extra_vars->{$info->name} = $info->value;
|
$extra_vars->{$info->name} = $info->value;
|
||||||
|
|
@ -238,7 +238,7 @@ class moduleAdminController extends module
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mseeage = $lang->success_registed;
|
$message = $lang->success_registed;
|
||||||
$this->setMessage('success_registed');
|
$this->setMessage('success_registed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -306,11 +306,13 @@ class moduleAdminController extends module
|
||||||
$grant_list->manager = new stdClass();
|
$grant_list->manager = new stdClass();
|
||||||
$grant_list->manager->default = 'manager';
|
$grant_list->manager->default = 'manager';
|
||||||
|
|
||||||
|
$grant = new stdClass();
|
||||||
foreach($grant_list as $grant_name => $grant_info)
|
foreach($grant_list as $grant_name => $grant_info)
|
||||||
{
|
{
|
||||||
// Get the default value
|
// Get the default value
|
||||||
$default = Context::get($grant_name.'_default');
|
$default = Context::get($grant_name.'_default');
|
||||||
// -1 = Log-in user only, -2 = site members only, -3 = manager only, 0 = all users
|
// -1 = Log-in user only, -2 = site members only, -3 = manager only, 0 = all users
|
||||||
|
$grant->{$grant_name} = array();
|
||||||
if(strlen($default))
|
if(strlen($default))
|
||||||
{
|
{
|
||||||
$grant->{$grant_name}[] = $default;
|
$grant->{$grant_name}[] = $default;
|
||||||
|
|
@ -329,7 +331,7 @@ class moduleAdminController extends module
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$grant->{$group_srls} = array();
|
$grant->{$group_srls} = array(); // dead code????
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stored in the DB
|
// Stored in the DB
|
||||||
|
|
@ -338,19 +340,16 @@ class moduleAdminController extends module
|
||||||
$output = executeQuery('module.deleteModuleGrants', $args);
|
$output = executeQuery('module.deleteModuleGrants', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
// Permissions stored in the DB
|
// Permissions stored in the DB
|
||||||
if($grant)
|
foreach($grant as $grant_name => $group_srls)
|
||||||
{
|
{
|
||||||
foreach($grant as $grant_name => $group_srls)
|
foreach($group_srls as $val)
|
||||||
{
|
{
|
||||||
foreach($group_srls as $val)
|
$args = new stdClass();
|
||||||
{
|
$args->module_srl = $module_srl;
|
||||||
$args = new stdClass();
|
$args->name = $grant_name;
|
||||||
$args->module_srl = $module_srl;
|
$args->group_srl = $val;
|
||||||
$args->name = $grant_name;
|
$output = executeQuery('module.insertModuleGrant', $args);
|
||||||
$args->group_srl = $val;
|
if(!$output->toBool()) return $output;
|
||||||
$output = executeQuery('module.insertModuleGrant', $args);
|
|
||||||
if(!$output->toBool()) return $output;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->setMessage('success_registed');
|
$this->setMessage('success_registed');
|
||||||
|
|
@ -587,6 +586,7 @@ class moduleAdminController extends module
|
||||||
// Get the default value
|
// Get the default value
|
||||||
$default = Context::get($grant_name.'_default');
|
$default = Context::get($grant_name.'_default');
|
||||||
// -1 = Sign only, 0 = all users
|
// -1 = Sign only, 0 = all users
|
||||||
|
$grant->{$grant_name} = array();
|
||||||
if(strlen($default))
|
if(strlen($default))
|
||||||
{
|
{
|
||||||
$grant->{$grant_name}[] = $default;
|
$grant->{$grant_name}[] = $default;
|
||||||
|
|
@ -608,7 +608,7 @@ class moduleAdminController extends module
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$grant->{$group_srls} = array();
|
$grant->{$group_srls} = array(); // dead code, too??
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stored in the DB
|
// Stored in the DB
|
||||||
|
|
|
||||||
|
|
@ -174,8 +174,8 @@ class moduleAdminView extends module
|
||||||
$skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/'.$module_info->module);
|
$skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/'.$module_info->module);
|
||||||
Context::set('skin_list',$skin_list);
|
Context::set('skin_list',$skin_list);
|
||||||
// Get a layout list
|
// Get a layout list
|
||||||
$oLayoutMode = &getModel('layout');
|
$oLayoutModel = &getModel('layout');
|
||||||
$layout_list = $oLayoutMode->getLayoutList();
|
$layout_list = $oLayoutModel->getLayoutList();
|
||||||
Context::set('layout_list', $layout_list);
|
Context::set('layout_list', $layout_list);
|
||||||
// Get a list of module categories
|
// Get a list of module categories
|
||||||
$module_category = $oModuleModel->getModuleCategories();
|
$module_category = $oModuleModel->getModuleCategories();
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ class moduleModel extends module
|
||||||
if(!$output || !$output->data) { $domain = ''; unset($output); }
|
if(!$output || !$output->data) { $domain = ''; unset($output); }
|
||||||
}
|
}
|
||||||
// If no virtual website was found, get default website
|
// If no virtual website was found, get default website
|
||||||
if($domain === '')
|
else
|
||||||
{
|
{
|
||||||
if($oCacheHandler->isSupport()) $output = $oCacheHandler->get('default_site');
|
if($oCacheHandler->isSupport()) $output = $oCacheHandler->get('default_site');
|
||||||
if(!$output)
|
if(!$output)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue