mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
issue 2205 modified a function that a new document create when copied page type of article.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11018 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
90d6dc7b32
commit
b7df903799
1 changed files with 16 additions and 1 deletions
|
|
@ -73,7 +73,8 @@
|
||||||
/**
|
/**
|
||||||
* @brief Copy Module
|
* @brief Copy Module
|
||||||
**/
|
**/
|
||||||
function procModuleAdminCopyModule() {
|
function procModuleAdminCopyModule()
|
||||||
|
{
|
||||||
// Get information of the target module to copy
|
// Get information of the target module to copy
|
||||||
$module_srl = Context::get('module_srl');
|
$module_srl = Context::get('module_srl');
|
||||||
if(!$module_srl) return;
|
if(!$module_srl) return;
|
||||||
|
|
@ -114,6 +115,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
$oDB->begin();
|
$oDB->begin();
|
||||||
// Copy a module
|
// Copy a module
|
||||||
|
|
@ -130,6 +132,19 @@
|
||||||
// Create a module
|
// Create a module
|
||||||
$output = $oModuleController->insertModule($clone_args);
|
$output = $oModuleController->insertModule($clone_args);
|
||||||
$module_srl = $output->get('module_srl');
|
$module_srl = $output->get('module_srl');
|
||||||
|
|
||||||
|
if($module_info->module == 'page' && $extra_vars->page_type == 'ARTICLE')
|
||||||
|
{
|
||||||
|
// copy document
|
||||||
|
$oDocumentAdminController = &getAdminController('document');
|
||||||
|
$copyOutput = $oDocumentAdminController->copyDocumentModule(array($extra_vars->document_srl), $module_srl, $module_info->category_srl);
|
||||||
|
$document_srls = $copyOutput->get('copied_srls');
|
||||||
|
if($document_srls && count($document_srls) > 0)
|
||||||
|
{
|
||||||
|
$extra_vars->document_srl = array_pop($document_srls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Grant module permissions
|
// Grant module permissions
|
||||||
if(count($grant)) $oModuleController->insertModuleGrants($module_srl, $grant);
|
if(count($grant)) $oModuleController->insertModuleGrants($module_srl, $grant);
|
||||||
if ($extra_vars) $oModuleController->insertModuleExtraVars($module_srl, $extra_vars);
|
if ($extra_vars) $oModuleController->insertModuleExtraVars($module_srl, $extra_vars);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue