mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 18:32:52 +09:00
issue 1527 copy extra keys when module copied
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10198 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b5d4bfe9dc
commit
c780878499
3 changed files with 35 additions and 0 deletions
|
|
@ -1831,5 +1831,26 @@ class documentController extends document {
|
|||
if(!$obj->status && $obj->is_secret == 'Y') $obj->status = $this->getConfigStatus('secret');
|
||||
if(!$obj->status && $obj->is_secret != 'Y') $obj->status = $this->getConfigStatus('public');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief copy extra keys when module copied
|
||||
**/
|
||||
function triggerCopyModuleExtraKeys(&$obj)
|
||||
{
|
||||
$oDocumentModel = &getModel('document');
|
||||
$documentExtraKeys = $oDocumentModel->getExtraKeys($obj->originModuleSrl);
|
||||
|
||||
if(is_array($documentExtraKeys) && is_array($obj->moduleSrlList))
|
||||
{
|
||||
$oDocumentController=&getController('document');
|
||||
foreach($obj->moduleSrlList AS $key=>$value)
|
||||
{
|
||||
foreach($documentExtraKeys AS $extraItem)
|
||||
{
|
||||
$oDocumentController->insertDocumentExtraKey($value, $extraItem->idx, $extraItem->name, $extraItem->type, $extraItem->is_required , $extraItem->search , $extraItem->default , $extraItem->desc, $extraItem->eid) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue