mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
issue 2705 when delete last instance of layout, layout uninstall also
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12275 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
02c0909e26
commit
41fc5be074
4 changed files with 56 additions and 11 deletions
|
|
@ -276,7 +276,21 @@ class layoutAdminController extends layout
|
|||
$layoutList = $oLayoutModel->getLayoutInstanceList($layoutInfo->site_srl, $layoutInfo->layout_type, $layoutInfo->layout, array('layout_srl'));
|
||||
if(count($layoutList) <= 1)
|
||||
{
|
||||
return new Object(-1, 'msg_at_least_one_layout');
|
||||
// uninstall package
|
||||
$path = $layoutInfo->path;
|
||||
|
||||
$oAutoinstallModel = &getModel('autoinstall');
|
||||
$packageSrl = $oAutoinstallModel->getPackageSrlByPath($path);
|
||||
$oAutoinstallAdminController = &getAdminController('autoinstall');
|
||||
|
||||
if($packageSrl)
|
||||
{
|
||||
$oAutoinstallAdminController->uninstallPackageByPackageSrl($packageSrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oAutoinstallAdminController->uninstallPackageByPath($path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue