issue 2364 develop menu copy function with module copy

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11230 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-09-13 09:40:15 +00:00
parent 3fe93908c5
commit 0e3d957f99
3 changed files with 319 additions and 88 deletions

View file

@ -73,14 +73,25 @@
/**
* @brief Copy Module
**/
function procModuleAdminCopyModule()
function procModuleAdminCopyModule($args = NULL)
{
// Get information of the target module to copy
$module_srl = Context::get('module_srl');
$isProc = false;
if(!$args)
{
$isProc = true;
// Get information of the target module to copy
$module_srl = Context::get('module_srl');
$args = Context::getRequestVars();
}
else
{
$module_srl = $args->module_srl;
}
if(!$module_srl) return;
// Get module name to create and browser title
$clones = array();
$args = Context::getAll();
for($i=1;$i<=10;$i++) {
$mid = trim($args->{"mid_".$i});
if(!$mid) continue;
@ -206,16 +217,21 @@
$this->setMessage('success_registed');
}
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
global $lang;
htmlHeader();
alertScript($message);
reload(true);
closePopupScript();
htmlFooter();
Context::close();
exit;
if($isProc)
{
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
global $lang;
htmlHeader();
alertScript($message);
reload(true);
closePopupScript();
htmlFooter();
Context::close();
exit;
}
}
return $module_srl;
}
/**