rss feed image delete api add

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12529 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2013-01-10 07:36:46 +00:00
parent 2bf9c55a34
commit 79233d1bb9
2 changed files with 20 additions and 0 deletions

View file

@ -7,6 +7,7 @@
<action name="rss" type="view" standalone="true" />
<action name="atom" type="view" standalone="true" />
<action name="procRssAdminInsertConfig" type="controller" standalone="true" ruleset="insertRssConfig" />
<action name="procRssAdminDeleteFeedImage" type="controller" standalone="true" />
<action name="procRssAdminInsertModuleConfig" type="controller" standalone="true" ruleset="insertRssModuleConfig" />
</actions>
<menus>

View file

@ -87,6 +87,25 @@ class rssAdminController extends rss
$this->setRedirectUrl($returnUrl);
}
public function procRssAdminDeleteFeedImage()
{
$delImage = Context::get('del_image');
$oModuleModel = &getModel('module');
$originConfig = $oModuleModel->getModuleConfig('rss');
// Get a variable for the delete request
if($delImage == 'Y')
{
FileHandler::removeFile($originConfig->image);
$originConfig->image = '';
$output = $this->setFeedConfig($originConfig);
return new Object(0, 'success_updated');
}
return new Object(-1, 'fail_to_delete');
}
/**
* RSS Module configurations
*