issue 1894 modify name of layout in theme, add 'skin fixed' option on page info.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10954 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-07-27 05:42:00 +00:00
parent f7109b400e
commit 339c6e6d29
6 changed files with 56 additions and 7 deletions

View file

@ -35,6 +35,18 @@
if(!$oDB->isColumnExists('layouts', 'layout_type')) return true;
$args->layout = '.';
$output = executeQueryArray('layout.getLayoutDotList', $args);
if($output->data && count($output->data) > 0)
{
foreach($output->data as $layout)
{
$layout_path = explode('.', $layout->layout);
if(count($layout_path) != 2) continue;
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) return true;
}
}
return false;
}
@ -66,6 +78,21 @@
$oDB->addColumn('layouts','layout_type','char',1,'P',true);
}
$output = executeQueryArray('layout.getLayoutDotList', $args);
if($output->data && count($output->data) > 0)
{
foreach($output->data as $layout)
{
$layout_path = explode('.', $layout->layout);
if(count($layout_path) != 2) continue;
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1])))
{
$args->layout = implode('|@|', $layout_path);
$args->layout_srl = $layout->layout_srl;
$output = executeQuery('layout.updateLayout', $args);
}
}
}
return new Object(0, 'success_updated');
}