mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
issue 160, if layout files not exists, delete layout instance. fixed a bug for return wrong info data when layout info.xml`s version is less than 0.2
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9342 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3e6e1d68d6
commit
68f31cb209
3 changed files with 13 additions and 3 deletions
|
|
@ -66,7 +66,16 @@
|
|||
if(!$output->data) return;
|
||||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
//insert in cache
|
||||
|
||||
// If deleted layout files, delete layout instance
|
||||
if (!$layout_info) {
|
||||
$oLayoutController = &getAdminController('layout');
|
||||
$oLayoutController->deleteLayout($layout_srl);
|
||||
debugPrint('delete');
|
||||
return;
|
||||
}
|
||||
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$layout_info);
|
||||
}
|
||||
return $layout_info;
|
||||
|
|
@ -405,7 +414,7 @@
|
|||
if(!is_array($options)) $options = array($options);
|
||||
$options_count = count($options);
|
||||
for($j=0;$j<$options_count;$j++) {
|
||||
$buff .= sprintf('$layout_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->name, $options[$j]->value->body, $options[$j]->title->body);
|
||||
$buff .= sprintf('$layout_info->extra_var->%s->options["%s"]->val = "%s";', $var->attrs->name, $options[$j]->value->body, $options[$j]->title->body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
</block>
|
||||
|
||||
<select cond="$var->type == 'select'" name="{$name}">
|
||||
<option loop="$var->options => $key, $val" value="{$key}" selected="selected"|cond="$key == $var->value">{$val}</option>
|
||||
<option loop="$var->options => $key, $val" value="{$key}" selected="selected"|cond="$key == $var->value">{$val->val}</option>
|
||||
</select>
|
||||
|
||||
<block cond="$var->type == 'radio'">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue