case 'editA': editModule($option, $id, $client); break; case 'save': case 'apply': saveModule($option, $client, $task); break; case 'remove': removeModule($cid, $option, $client); break; case 'cancel': cancelModule($option, $client); break; case 'publish': case 'unpublish': publishModule($cid, $task == 'publish', $option, $client); break; case 'orderup': case 'orderdown': orderModule(intval($cid[0]), $task == 'orderup' ? -1 : 1, $option); break; case 'accesspublic': case 'accessregistered': case 'accessspecial': accessMenu(intval($cid[0]), $task, $option, $client); break; case 'saveorder': saveOrder($cid, $client); break; default: viewModules($option, $client);
* @category DOCman * @package DOCman15 * @copyright Copyright (C) 2003 - 2012 Johan Janssens. All rights reserved. * @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> * @link http://www.joomladocman.org */ defined('_JEXEC') or die('Restricted access'); //include_once dirname(__FILE__) . DS.'modules.html.php'; $moduleid = JRequest::getInt('moduleid', null); $mainframe = JFactory::getApplication(); $client = strval(JRequest::getCmd('client', 'admin')); JArrayHelper::toInteger($cid); switch ($task) { case 'publish': case 'unpublish': publishModule(array($moduleid), $task == 'publish', $option, $client); break; case 'orderup': case 'orderdown': orderModule($moduleid, $task == 'orderup' ? -1 : 1, $option, $client); break; default: $mainframe->redirect('index.php?option=com_docman'); break; } function publishModule($cid = null, $publish = 1, $option, $client = 'admin') { $database = JFactory::getDBO(); $my = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (count($cid) < 1) {