mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix warnings in PHP.x across several modules involved in site menu & design editing feature
This commit is contained in:
parent
82b8785c14
commit
741f725bcf
6 changed files with 64 additions and 51 deletions
|
|
@ -432,8 +432,8 @@ class autoinstallAdminModel extends autoinstall
|
||||||
$_download_server = 'https://download.xpressengine.com/';
|
$_download_server = 'https://download.xpressengine.com/';
|
||||||
|
|
||||||
$config = new stdClass();
|
$config = new stdClass();
|
||||||
$config->location_site = $config_info->location_site ? $config_info->location_site : $_location_site;
|
$config->location_site = ($config_info->location_site ?? null) ?: $_location_site;
|
||||||
$config->download_server = $config_info->download_server ? $config_info->download_server : $_download_server;
|
$config->download_server = ($config_info->download_server ?? null) ?: $_download_server;
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -349,13 +349,13 @@ class autoinstallModel extends autoinstall
|
||||||
$path = substr($path, 0, strlen($path) - 1);
|
$path = substr($path, 0, strlen($path) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path])
|
if(empty($GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path]))
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->path = $path;
|
$args->path = $path;
|
||||||
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
|
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
|
||||||
|
|
||||||
$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl;
|
$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
|
return $GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<script src="modules/module/tpl/js/module_admin.js"></script>
|
<script src="modules/module/tpl/js/module_admin.js"></script>
|
||||||
<script>
|
<script>
|
||||||
</script>
|
</script>
|
||||||
|
{@ if(!isset($member_config)) $member_config = MemberModel::getMemberConfig()}
|
||||||
<form ruleset="insertBoardForBasic" id="fo_obj" class="x_form-horizontal" action="./" method="post" enctype="multipart/form-data">
|
<form ruleset="insertBoardForBasic" id="fo_obj" class="x_form-horizontal" action="./" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="act" value="procBoardAdminUpdateBoard" />
|
<input type="hidden" name="act" value="procBoardAdminUpdateBoard" />
|
||||||
<input type="hidden" name="board_name" value="{$module_info->mid}" />
|
<input type="hidden" name="board_name" value="{$module_info->mid}" />
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ class LayoutModel extends Layout
|
||||||
|
|
||||||
foreach($layoutList as $key => $val)
|
foreach($layoutList as $key => $val)
|
||||||
{
|
{
|
||||||
if($thumbs[$val->layouts])
|
if(!empty($thumbs[$val->layouts ?? '']))
|
||||||
{
|
{
|
||||||
$val->thumbnail = $thumbs[$val->layouts];
|
$val->thumbnail = $thumbs[$val->layouts];
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -330,7 +330,7 @@ class LayoutModel extends Layout
|
||||||
*/
|
*/
|
||||||
function getLayoutPath($layout_name = "", $layout_type = "P")
|
function getLayoutPath($layout_name = "", $layout_type = "P")
|
||||||
{
|
{
|
||||||
$layout_parse = explode('|@|', $layout_name);
|
$layout_parse = explode('|@|', $layout_name ?? '');
|
||||||
if(count($layout_parse) > 1)
|
if(count($layout_parse) > 1)
|
||||||
{
|
{
|
||||||
$class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/';
|
$class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/';
|
||||||
|
|
@ -420,8 +420,8 @@ class LayoutModel extends Layout
|
||||||
$b->title = $b->layout;
|
$b->title = $b->layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aTitle = strtolower($a->title);
|
$aTitle = strtolower($a->title ?? '');
|
||||||
$bTitle = strtolower($b->title);
|
$bTitle = strtolower($b->title ?? '');
|
||||||
|
|
||||||
if($aTitle == $bTitle)
|
if($aTitle == $bTitle)
|
||||||
{
|
{
|
||||||
|
|
@ -460,7 +460,10 @@ class LayoutModel extends Layout
|
||||||
$globalValueKey = 'PC_LAYOUT_DIRECTORIES';
|
$globalValueKey = 'PC_LAYOUT_DIRECTORIES';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS[$globalValueKey]) return $GLOBALS[$globalValueKey];
|
if(!empty($GLOBALS[$globalValueKey]))
|
||||||
|
{
|
||||||
|
return $GLOBALS[$globalValueKey];
|
||||||
|
}
|
||||||
|
|
||||||
$searchedList = FileHandler::readDir($directory);
|
$searchedList = FileHandler::readDir($directory);
|
||||||
if (!$searchedList) $searchedList = array();
|
if (!$searchedList) $searchedList = array();
|
||||||
|
|
@ -493,6 +496,12 @@ class LayoutModel extends Layout
|
||||||
$xml_file = sprintf('%sskin.xml', $layout_path);
|
$xml_file = sprintf('%sskin.xml', $layout_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$layout_title = $layout = $layout_srl = null;
|
||||||
|
$site_srl = 0;
|
||||||
|
$vars = new stdClass;
|
||||||
|
}
|
||||||
|
|
||||||
// Get a path of the requested module. Return if not exists.
|
// Get a path of the requested module. Return if not exists.
|
||||||
if(!isset($layout_path))
|
if(!isset($layout_path))
|
||||||
|
|
@ -516,7 +525,7 @@ class LayoutModel extends Layout
|
||||||
$layout_info->layout = $layout;
|
$layout_info->layout = $layout;
|
||||||
$layout_info->path = $layout_path;
|
$layout_info->path = $layout_path;
|
||||||
$layout_info->layout_title = $layout_title;
|
$layout_info->layout_title = $layout_title;
|
||||||
if(!$layout_info->layout_type)
|
if(empty($layout_info->layout_type))
|
||||||
{
|
{
|
||||||
$layout_info->layout_type = $layout_type;
|
$layout_info->layout_type = $layout_type;
|
||||||
}
|
}
|
||||||
|
|
@ -524,7 +533,7 @@ class LayoutModel extends Layout
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the cache file if it is valid and then return $layout_info variable
|
// Include the cache file if it is valid and then return $layout_info variable
|
||||||
if(!$layout_srl)
|
if(empty($layout_srl))
|
||||||
{
|
{
|
||||||
$cache_file = $this->getLayoutCache($layout, Context::getLangType(), $layout_type);
|
$cache_file = $this->getLayoutCache($layout, Context::getLangType(), $layout_type);
|
||||||
}
|
}
|
||||||
|
|
@ -566,7 +575,7 @@ class LayoutModel extends Layout
|
||||||
|
|
||||||
$buff = array();
|
$buff = array();
|
||||||
$buff[] = '$layout_info = new stdClass;';
|
$buff[] = '$layout_info = new stdClass;';
|
||||||
$buff[] = sprintf('$layout_info->site_srl = %s;', var_export($site_srl, true));
|
$buff[] = sprintf('$layout_info->site_srl = %s;', var_export($site_srl ?? 0, true));
|
||||||
|
|
||||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2')
|
if($xml_obj->version && $xml_obj->attrs->version == '0.2')
|
||||||
{
|
{
|
||||||
|
|
@ -575,17 +584,17 @@ class LayoutModel extends Layout
|
||||||
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
|
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||||
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||||
$buff[] = sprintf('$layout_info->layout = %s;', var_export($layout, true));
|
$buff[] = sprintf('$layout_info->layout = %s;', var_export($layout, true));
|
||||||
$buff[] = sprintf('$layout_info->type = %s;', var_export($xml_obj->attrs->type, true));
|
$buff[] = sprintf('$layout_info->type = %s;', var_export($xml_obj->attrs->type ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->path = %s;', var_export($layout_path, true));
|
$buff[] = sprintf('$layout_info->path = %s;', var_export($layout_path, true));
|
||||||
$buff[] = sprintf('$layout_info->title = %s;', var_export($xml_obj->title->body, true));
|
$buff[] = sprintf('$layout_info->title = %s;', var_export($xml_obj->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->description = %s;', var_export($xml_obj->description->body, true));
|
$buff[] = sprintf('$layout_info->description = %s;', var_export($xml_obj->description->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->version = %s;', var_export($xml_obj->version->body, true));
|
$buff[] = sprintf('$layout_info->version = %s;', var_export($xml_obj->version->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->date = %s;', var_export($date, true));
|
$buff[] = sprintf('$layout_info->date = %s;', var_export($date, true));
|
||||||
$buff[] = sprintf('$layout_info->homepage = %s;', var_export($xml_obj->link->body, true));
|
$buff[] = sprintf('$layout_info->homepage = %s;', var_export($xml_obj->link->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->layout_srl = $layout_srl;');
|
$buff[] = sprintf('$layout_info->layout_srl = $layout_srl;');
|
||||||
$buff[] = sprintf('$layout_info->layout_title = $layout_title;');
|
$buff[] = sprintf('$layout_info->layout_title = $layout_title;');
|
||||||
$buff[] = sprintf('$layout_info->license = %s;', var_export($xml_obj->license->body, true));
|
$buff[] = sprintf('$layout_info->license = %s;', var_export($xml_obj->license->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->license_link = %s;', var_export($xml_obj->license->attrs->link, true));
|
$buff[] = sprintf('$layout_info->license_link = %s;', var_export($xml_obj->license->attrs->link ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->layout_type = %s;', var_export($layout_type, true));
|
$buff[] = sprintf('$layout_info->layout_type = %s;', var_export($layout_type, true));
|
||||||
|
|
||||||
// Author information
|
// Author information
|
||||||
|
|
@ -625,11 +634,11 @@ class LayoutModel extends Layout
|
||||||
$name = $var->attrs->name;
|
$name = $var->attrs->name;
|
||||||
|
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s = new stdClass;', $name);
|
$buff[] = sprintf('$layout_info->extra_var->%s = new stdClass;', $name);
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->group = %s;', $name, var_export($group->title->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->group = %s;', $name, var_export($group->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->title = %s;', $name, var_export($var->title->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->title = %s;', $name, var_export($var->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->type = %s;', $name, var_export($var->attrs->type, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->type = %s;', $name, var_export($var->attrs->type ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $name, $name);
|
$buff[] = sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $name, $name);
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->description = %s;', $name, var_export($var->description->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->description = %s;', $name, var_export($var->description->body ?? null, true));
|
||||||
|
|
||||||
$options = $var->options;
|
$options = $var->options;
|
||||||
if(!$options) continue;
|
if(!$options) continue;
|
||||||
|
|
@ -693,17 +702,17 @@ class LayoutModel extends Layout
|
||||||
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||||
$buff[] = sprintf('$layout_info->layout = %s;', var_export($layout, true));
|
$buff[] = sprintf('$layout_info->layout = %s;', var_export($layout, true));
|
||||||
$buff[] = sprintf('$layout_info->path = %s;', var_export($layout_path, true));
|
$buff[] = sprintf('$layout_info->path = %s;', var_export($layout_path, true));
|
||||||
$buff[] = sprintf('$layout_info->title = %s;', var_export($xml_obj->title->body, true));
|
$buff[] = sprintf('$layout_info->title = %s;', var_export($xml_obj->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->description = %s;', var_export($xml_obj->author->description->body, true));
|
$buff[] = sprintf('$layout_info->description = %s;', var_export($xml_obj->author->description->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->version = %s;', var_export($xml_obj->attrs->version, true));
|
$buff[] = sprintf('$layout_info->version = %s;', var_export($xml_obj->attrs->version ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->date = %s;', var_export($date, true));
|
$buff[] = sprintf('$layout_info->date = %s;', var_export($date, true));
|
||||||
$buff[] = sprintf('$layout_info->layout_srl = $layout_srl;');
|
$buff[] = sprintf('$layout_info->layout_srl = $layout_srl;');
|
||||||
$buff[] = sprintf('$layout_info->layout_title = $layout_title;');
|
$buff[] = sprintf('$layout_info->layout_title = $layout_title;');
|
||||||
// Author information
|
// Author information
|
||||||
$buff[] = '$layout_info->author[0] = new stdClass();';
|
$buff[] = '$layout_info->author[0] = new stdClass();';
|
||||||
$buff[] = sprintf('$layout_info->author[0]->name = %s;', var_export($xml_obj->author->name->body, true));
|
$buff[] = sprintf('$layout_info->author[0]->name = %s;', var_export($xml_obj->author->name->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->author[0]->email_address = %s;', var_export($xml_obj->author->attrs->email_address, true));
|
$buff[] = sprintf('$layout_info->author[0]->email_address = %s;', var_export($xml_obj->author->attrs->email_address ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->author[0]->homepage = %s;', var_export($xml_obj->author->attrs->link, true));
|
$buff[] = sprintf('$layout_info->author[0]->homepage = %s;', var_export($xml_obj->author->attrs->link ?? null, true));
|
||||||
// Extra vars (user defined variables to use in a template)
|
// Extra vars (user defined variables to use in a template)
|
||||||
$extra_var_groups = $xml_obj->extra_vars->group;
|
$extra_var_groups = $xml_obj->extra_vars->group;
|
||||||
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
||||||
|
|
@ -727,11 +736,11 @@ class LayoutModel extends Layout
|
||||||
$var = $extra_vars[$i];
|
$var = $extra_vars[$i];
|
||||||
$name = $var->attrs->name;
|
$name = $var->attrs->name;
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s = new stdClass();', $name);
|
$buff[] = sprintf('$layout_info->extra_var->%s = new stdClass();', $name);
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->group = %s;', $name, var_export($group->title->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->group = %s;', $name, var_export($group->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->title = %s;', $name, var_export($var->title->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->title = %s;', $name, var_export($var->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->type = %s;', $name, var_export($var->attrs->type, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->type = %s;', $name, var_export($var->attrs->type ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $name, $name);
|
$buff[] = sprintf('$layout_info->extra_var->%s->value = $vars->%s;', $name, $name);
|
||||||
$buff[] = sprintf('$layout_info->extra_var->%s->description = %s;', $name, var_export($var->description->body, true));
|
$buff[] = sprintf('$layout_info->extra_var->%s->description = %s;', $name, var_export($var->description->body ?? null, true));
|
||||||
|
|
||||||
$options = $var->options;
|
$options = $var->options;
|
||||||
if(!$options) continue;
|
if(!$options) continue;
|
||||||
|
|
@ -762,8 +771,8 @@ class LayoutModel extends Layout
|
||||||
if($menus[$i]->attrs->default == "true") $buff[] = sprintf('$layout_info->default_menu = %s;', var_export($name, true));
|
if($menus[$i]->attrs->default == "true") $buff[] = sprintf('$layout_info->default_menu = %s;', var_export($name, true));
|
||||||
$buff[] = sprintf('$layout_info->menu->%s = new stdClass();', $name);
|
$buff[] = sprintf('$layout_info->menu->%s = new stdClass();', $name);
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->name = %s;', $name, var_export($name, true));
|
$buff[] = sprintf('$layout_info->menu->%s->name = %s;', $name, var_export($name, true));
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->title = %s;', $name, var_export($menus[$i]->title->body, true));
|
$buff[] = sprintf('$layout_info->menu->%s->title = %s;', $name, var_export($menus[$i]->title->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->maxdepth = %s;', $name, var_export($menus[$i]->maxdepth->body, true));
|
$buff[] = sprintf('$layout_info->menu->%s->maxdepth = %s;', $name, var_export($menus[$i]->maxdepth->body ?? null, true));
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->menu_srl = $vars->%s;', $name, $name);
|
$buff[] = sprintf('$layout_info->menu->%s->menu_srl = $vars->%s;', $name, $name);
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->xml_file = "./files/cache/menu/".$vars->%s.".xml.php";',$name, $name);
|
$buff[] = sprintf('$layout_info->menu->%s->xml_file = "./files/cache/menu/".$vars->%s.".xml.php";',$name, $name);
|
||||||
$buff[] = sprintf('$layout_info->menu->%s->php_file = "./files/cache/menu/".$vars->%s.".php";',$name, $name);
|
$buff[] = sprintf('$layout_info->menu->%s->php_file = "./files/cache/menu/".$vars->%s.".php";',$name, $name);
|
||||||
|
|
@ -776,7 +785,7 @@ class LayoutModel extends Layout
|
||||||
$layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl);
|
$layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl);
|
||||||
$header_script = trim($layout_config->header_script);
|
$header_script = trim($layout_config->header_script);
|
||||||
|
|
||||||
if($header_script)
|
if(!empty($header_script))
|
||||||
{
|
{
|
||||||
$buff[] = sprintf(' $layout_info->header_script = %s; ', var_export($header_script, true));
|
$buff[] = sprintf(' $layout_info->header_script = %s; ', var_export($header_script, true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ class MenuAdminModel extends Menu
|
||||||
{
|
{
|
||||||
// Get information from the DB
|
// Get information from the DB
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->menu_srl = $menu_srl;
|
|
||||||
$output = executeQueryArray('menu.getMenus', $args);
|
$output = executeQueryArray('menu.getMenus', $args);
|
||||||
if(!$output->data) return;
|
if(!$output->data) return;
|
||||||
$menus = $output->data;
|
$menus = $output->data;
|
||||||
|
|
@ -199,8 +198,8 @@ class MenuAdminModel extends Menu
|
||||||
if($moduleInfo->mid == $menuItem->url)
|
if($moduleInfo->mid == $menuItem->url)
|
||||||
{
|
{
|
||||||
$menuItem->moduleType = $moduleInfo->module;
|
$menuItem->moduleType = $moduleInfo->module;
|
||||||
$menuItem->pageType = $moduleInfo->page_type;
|
$menuItem->pageType = $moduleInfo->page_type ?? null;
|
||||||
$menuItem->layoutSrl = $moduleInfo->layout_srl;
|
$menuItem->layoutSrl = $moduleInfo->layout_srl ?? -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -359,14 +358,14 @@ class MenuAdminModel extends Menu
|
||||||
$defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M');
|
$defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M');
|
||||||
$skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin);
|
$skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin);
|
||||||
$mobileSkinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultMobileSkin, 'm.skins');
|
$mobileSkinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultMobileSkin, 'm.skins');
|
||||||
if($defaultMobileSkin === '/USE_RESPONSIVE/' && !$mobileSkinInfo || !$mobileSkinInfo->title)
|
if($defaultMobileSkin === '/USE_RESPONSIVE/' && !$mobileSkinInfo || empty($mobileSkinInfo->title))
|
||||||
{
|
{
|
||||||
$mobileSkinInfo = $mobileSkinInfo ?: new stdClass;
|
$mobileSkinInfo = $mobileSkinInfo ?: new stdClass;
|
||||||
$mobileSkinInfo->title = lang('use_responsive_pc_skin');
|
$mobileSkinInfo->title = lang('use_responsive_pc_skin');
|
||||||
}
|
}
|
||||||
$module->defaultSkin = new stdClass();
|
$module->defaultSkin = new stdClass();
|
||||||
$module->defaultSkin->skin = $defaultSkin;
|
$module->defaultSkin->skin = $defaultSkin;
|
||||||
$module->defaultSkin->title = $skinInfo->title ? $skinInfo->title : $defaultSkin;
|
$module->defaultSkin->title = isset($skinInfo->title) ? $skinInfo->title : $defaultSkin;
|
||||||
$module->defaultMobileSkin = new stdClass();
|
$module->defaultMobileSkin = new stdClass();
|
||||||
$module->defaultMobileSkin->skin = $defaultMobileSkin;
|
$module->defaultMobileSkin->skin = $defaultMobileSkin;
|
||||||
$module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin;
|
$module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin;
|
||||||
|
|
@ -556,7 +555,7 @@ class MenuAdminModel extends Menu
|
||||||
}
|
}
|
||||||
|
|
||||||
include($value->php_file);
|
include($value->php_file);
|
||||||
if(!$menu)
|
if(empty($menu))
|
||||||
{
|
{
|
||||||
$menu = new stdClass;
|
$menu = new stdClass;
|
||||||
$menu->list = array();
|
$menu->list = array();
|
||||||
|
|
@ -636,6 +635,10 @@ class MenuAdminModel extends Menu
|
||||||
{
|
{
|
||||||
$setupUrl = getNotEncodedUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl);
|
$setupUrl = getNotEncodedUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$setupUrl = null;
|
||||||
|
}
|
||||||
|
|
||||||
if($moduleConfInfo->simple_setup_index_act)
|
if($moduleConfInfo->simple_setup_index_act)
|
||||||
{
|
{
|
||||||
|
|
@ -691,7 +694,7 @@ class MenuAdminModel extends Menu
|
||||||
{
|
{
|
||||||
$menu['module_srl'] = $midInfo->module_srl;
|
$menu['module_srl'] = $midInfo->module_srl;
|
||||||
$menu['module'] = $midInfo->module;
|
$menu['module'] = $midInfo->module;
|
||||||
if($midInfo->page_type)
|
if(!empty($midInfo->page_type))
|
||||||
{
|
{
|
||||||
$menu['module_type'] = $midInfo->page_type;
|
$menu['module_type'] = $midInfo->page_type;
|
||||||
}
|
}
|
||||||
|
|
@ -701,11 +704,11 @@ class MenuAdminModel extends Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($moduleInfo->setup_index_act)
|
if(!empty($moduleInfo->setup_index_act))
|
||||||
{
|
{
|
||||||
$menu['setup_index_act'] = $moduleInfo->setup_index_act;
|
$menu['setup_index_act'] = $moduleInfo->setup_index_act;
|
||||||
}
|
}
|
||||||
else if($moduleInfo->default_index_act)
|
elseif(!empty($moduleInfo->default_index_act))
|
||||||
{
|
{
|
||||||
$menu['setup_index_act'] = $moduleInfo->default_index_act;
|
$menu['setup_index_act'] = $moduleInfo->default_index_act;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -322,13 +322,13 @@ class ModuleModel extends Module
|
||||||
}
|
}
|
||||||
|
|
||||||
$moduleInfo->designSettings->layout->pcIsDefault = $moduleInfo->layout_srl == -1 ? 1 : 0;
|
$moduleInfo->designSettings->layout->pcIsDefault = $moduleInfo->layout_srl == -1 ? 1 : 0;
|
||||||
$moduleInfo->designSettings->layout->pc = $layoutInfoPc->title;
|
$moduleInfo->designSettings->layout->pc = $layoutInfoPc->title ?? null;
|
||||||
$moduleInfo->designSettings->layout->mobileIsDefault = $moduleInfo->mlayout_srl == -1 ? 1 : 0;
|
$moduleInfo->designSettings->layout->mobileIsDefault = $moduleInfo->mlayout_srl == -1 ? 1 : 0;
|
||||||
$moduleInfo->designSettings->layout->mobile = $layoutInfoMobile->title;
|
$moduleInfo->designSettings->layout->mobile = $layoutInfoMobile->title ?? null;
|
||||||
$moduleInfo->designSettings->skin->pcIsDefault = $moduleInfo->is_skin_fix == 'N' ? 1 : 0;
|
$moduleInfo->designSettings->skin->pcIsDefault = $moduleInfo->is_skin_fix == 'N' ? 1 : 0;
|
||||||
$moduleInfo->designSettings->skin->pc = $skinInfoPc->title;
|
$moduleInfo->designSettings->skin->pc = $skinInfoPc->title ?? null;
|
||||||
$moduleInfo->designSettings->skin->mobileIsDefault = ($moduleInfo->is_mskin_fix == 'N' && $moduleInfo->mskin !== '/USE_RESPONSIVE/') ? 1 : 0;
|
$moduleInfo->designSettings->skin->mobileIsDefault = ($moduleInfo->is_mskin_fix == 'N' && $moduleInfo->mskin !== '/USE_RESPONSIVE/') ? 1 : 0;
|
||||||
$moduleInfo->designSettings->skin->mobile = $skinInfoMobile->title;
|
$moduleInfo->designSettings->skin->mobile = $skinInfoMobile->title ?? null;
|
||||||
|
|
||||||
$module_srl = Rhymix\Framework\Cache::get('site_and_module:module_srl:' . $mid);
|
$module_srl = Rhymix\Framework\Cache::get('site_and_module:module_srl:' . $mid);
|
||||||
if($module_srl)
|
if($module_srl)
|
||||||
|
|
@ -988,7 +988,7 @@ class ModuleModel extends Module
|
||||||
{
|
{
|
||||||
// Read xml file having skin information
|
// Read xml file having skin information
|
||||||
if(substr($path,-1)!='/') $path .= '/';
|
if(substr($path,-1)!='/') $path .= '/';
|
||||||
if(!preg_match('/^[a-zA-Z0-9_-]+$/', $skin))
|
if(!preg_match('/^[a-zA-Z0-9_-]+$/', $skin ?? ''))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1983,7 +1983,7 @@ class ModuleModel extends Module
|
||||||
{
|
{
|
||||||
include($designInfoFile);
|
include($designInfoFile);
|
||||||
|
|
||||||
$skinName = $designInfo->module->{$module_name}->{$target};
|
$skinName = $designInfo->module->{$module_name}->{$target} ?? null;
|
||||||
}
|
}
|
||||||
if(!isset($designInfo))
|
if(!isset($designInfo))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue