mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 2272 layout config copy bug fix
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11069 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c793a1c13c
commit
21e4539dfc
2 changed files with 19 additions and 5 deletions
|
|
@ -630,6 +630,12 @@
|
|||
$oLayoutModel = &getModel('layout');
|
||||
$layout = $oLayoutModel->getLayout($sourceArgs->layout_srl);
|
||||
|
||||
$args->extra_vars = $oLayoutModel->getLayoutRawData($sourceArgs->layout_srl, array('extra_vars'));
|
||||
$extra_vars = unserialize($args->extra_vars);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$layout_config->header_script = $extra_vars->header_script;
|
||||
|
||||
// Get information to create a layout
|
||||
$args->site_srl = (int)$layout->site_srl;
|
||||
$args->layout = $layout->layout;
|
||||
|
|
@ -651,6 +657,9 @@
|
|||
$args->layout_srl = getNextSequence();
|
||||
$args->title = $value;
|
||||
|
||||
// for header script
|
||||
$oModuleController->insertModulePartConfig('layout', $args->layout_srl, $layout_config);
|
||||
|
||||
// Insert into the DB
|
||||
$output = $this->insertLayout($args);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -663,11 +672,6 @@
|
|||
$this->initLayout($args->layout_srl, $args->layout);
|
||||
|
||||
// update layout info
|
||||
foreach($layout->extra_var as $key => $vals)
|
||||
{
|
||||
$args->extra_var->{$key} = $vals->value;
|
||||
}
|
||||
$args->extra_vars = serialize($args->extra_var);
|
||||
$output = $this->updateLayout($args);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,6 +97,16 @@
|
|||
return $layout_info;
|
||||
}
|
||||
|
||||
function getLayoutRawData($layout_srl, $columnList = array())
|
||||
{
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery('layout.getLayout', $args, $columnList);
|
||||
if(!$output->toBool())
|
||||
return;
|
||||
|
||||
return $output->data->extra_vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a layout path
|
||||
* @param string $layout_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue