mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 17:29:55 +09:00
merge from branch luminous (version 1.5.4.2, ~r12561)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2263200ce4
commit
cc47d2b247
196 changed files with 3655 additions and 2033 deletions
|
|
@ -216,6 +216,54 @@
|
|||
return $this->setRedirectUrl(Context::get('error_return_url'), $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanning favorite
|
||||
* @return Object
|
||||
*/
|
||||
function cleanFavorite()
|
||||
{
|
||||
$oModel = getAdminModel('admin');
|
||||
$output = $oModel->getFavoriteList();
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$favoriteList = $output->get('favoriteList');
|
||||
if(!$favoriteList)
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
$deleteTargets = array();
|
||||
foreach($favoriteList as $favorite)
|
||||
{
|
||||
if($favorite->type == 'module')
|
||||
{
|
||||
$modulePath = './modules/' . $favorite->module;
|
||||
$modulePath = FileHandler::getRealPath($modulePath);
|
||||
if(!is_dir($modulePath))
|
||||
{
|
||||
$deleteTargets[] = $favorite->admin_favorite_srl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($deleteTargets))
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
$args->admin_favorite_srls = $deleteTargets;
|
||||
$output = executeQuery('admin.deleteFavorites', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enviroment gathering agreement
|
||||
* @return void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue