mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
set default value in extra variables.
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11113 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e388c5d72a
commit
b2e40525c5
1 changed files with 14 additions and 5 deletions
|
|
@ -169,15 +169,24 @@
|
||||||
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($skin_info->extra_vars)) {
|
if(count($skin_info->extra_vars))
|
||||||
foreach($skin_info->extra_vars as $key => $val) {
|
{
|
||||||
|
foreach($skin_info->extra_vars as $key => $val)
|
||||||
|
{
|
||||||
$group = $val->group;
|
$group = $val->group;
|
||||||
$name = $val->name;
|
$name = $val->name;
|
||||||
$type = $val->type;
|
$type = $val->type;
|
||||||
if($skin_vars[$name]) $value = $skin_vars[$name]->value;
|
if($skin_vars[$name])
|
||||||
|
{
|
||||||
|
$value = $skin_vars[$name]->value;
|
||||||
|
}
|
||||||
else $value = '';
|
else $value = '';
|
||||||
if($type=="checkbox") $value = $value?unserialize($value):array();
|
if($type=="checkbox")
|
||||||
|
{
|
||||||
|
$value = $value?unserialize($value):array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = empty($value) ? $val->default : $value;
|
||||||
$skin_info->extra_vars[$key]->value= $value;
|
$skin_info->extra_vars[$key]->value= $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue