modified action of add filebox for ajax request

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9010 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-03 09:30:44 +00:00
parent c7d29a1c42
commit c1417a889e

View file

@ -615,11 +615,12 @@
* @brief Add and update a file into the file box
**/
function procModuleFileBoxAdd(){
$ajax = Context::get('ajax');
if ($ajax) Context::setRequestMethod('JSON');
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
$ajax = Context::get('ajax');
$vars = Context::gets('comment','addfile','filter');
$module_filebox_srl = Context::get('module_filebox_srl');
@ -656,7 +657,6 @@
}
else
{
Context::setRequestMethod('JSON');
$this->add('save_filename', $output->get('save_filename'));
}
}