public function execute($task) { if (!in_array($task, array('switchprofile', 'disablephpwarning', 'updateinfo', 'applydlid', 'resetSecretWord'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('protect', 'unprotect'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('save', 'cancel', 'downloaddat'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('main', 'apply'))) { $task = 'main'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('browse', 'getEupdates', 'notifications'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if ($task != 'step') { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('save', 'apply'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('browse', 'hide2copromo', 'wizardstep', 'updateinfo'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('purgesessions'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('overview', 'generate'))) { $task = 'overview'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('switchprofile', 'disablephpwarning', 'updateinfo'))) { $task = 'browse'; } parent::execute($task); }
function execute($task) { if (in_array($task, array('add', 'edit', 'read', 'browse'))) { $task = 'browse'; } return parent::execute($task); }
public function execute($task) { if (!in_array($task, array('offline', 'online'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('change'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { if (!in_array($task, array('savedefaults', 'saveperms', 'saveapplyperms'))) { $task = 'browse'; } $this->getThisModel()->setState('task', $task); parent::execute($task); }
public function execute($task) { if (!in_array($task, array('read', 'cancel'))) { $task = 'read'; $this->input->set('task', 'read'); } parent::execute($task); }
/** * Executes a given controller task. The onBefore<task> and onAfter<task> * methods are called automatically if they exist. * * @param string $task The task to execute, e.g. "browse" * * @throws Exception Exception thrown if the onBefore<task> returns false * * @return null|bool False on execution failure */ public function execute($task) { $validTasks = array('force', 'overview', 'startupdate', 'download', 'extract', 'install', 'cleanup'); if (!in_array($task, $validTasks)) { $task = 'overview'; } return parent::execute($task); }
/** * Overridden task dispatcher to whitelist specific tasks * * @param string $task The task to execute * * @return bool|null|void */ public function execute($task) { // We only allow specific tasks. If none matches, assume the user meant the "browse" task if (!in_array($task, array('step'))) { $task = 'show'; } $this->task = $task; parent::execute($task); }
/** * Overridden task dispatcher to whitelist specific tasks * * @param string $task The task to execute * * @return bool|null|void */ public function execute($task) { // Preload the model class of this view (we have a problem with the name, you know) $cpanelModel = $this->getModel('Cpanel', 'AdmintoolsModel'); // We only allow specific tasks. If none matches, assume the user meant the "browse" task if (!in_array($task, array('login', 'updategeoip', 'updateinfo', 'fastcheck', 'selfblocked', 'unblockme', 'applydlid', 'resetSecretWord'))) { $task = 'browse'; } $this->task = $task; parent::execute($task); }
public function execute($task) { // Only task browse and save are valid $allowedTasks = array('browse', 'save'); // Take browse as the default task if (!in_array($task, $allowedTasks)) { $task = 'browse'; } $this->input->set('task', $task, $this->input); parent::execute($task); }
public function execute($task) { $allowedTasks = array('browse', 'read', 'save'); if (in_array($task, array('edit', 'add'))) { $task = 'read'; } if (!in_array($task, $allowedTasks)) { return false; } $this->input->set('task', $task); return parent::execute($task); }
public function execute($task) { $app = JFactory::getApplication(); $appTask = $app->input->getCmd('appTask', ''); $values = $app->input->getArray($_POST); // Check if we are in a report method view. If it is so, // Try lo load the report plugin controller (if any) if ($task == "view" && $appTask != '') { $model = $this->getModel('Apps'); $id = $app->input->getInt('id', '0'); if (!$id) { parent::execute($task); } $model->setId($id); // get the data // not using getItem here to enable ->checkout (which requires JTable object) $row = $model->getTable(); $row->load((int) $model->getId()); $element = $row->element; // The name of the App Controller should be the same of the $_element name, // without the tool_ prefix and with the first letter Uppercase, and should // be placed into a controller.php file inside the root of the plugin // Ex: tool_standard => J2StoreControllerToolStandard in tool_standard/controller.php $controllerName = str_ireplace('app_', '', $element); $controllerName = ucfirst($controllerName); $path = JPATH_SITE . '/plugins/j2store/'; $controllerPath = $path . $element . '/' . $element . '/controller.php'; if (file_exists($controllerPath)) { require_once $controllerPath; } else { $controllerName = ''; } $className = 'J2StoreControllerApp' . $controllerName; if ($controllerName != '' && class_exists($className)) { // Create the controller $controller = new $className(); // Add the view Path $controller->addViewPath($path); // Perform the requested task $controller->execute($appTask); // Redirect if set by the controller $controller->redirect(); } else { parent::execute($task); } } else { parent::execute($task); } }
public function execute($task) { // Enforce raw mode - I need to be in full control! $document = JFactory::getDocument(); if ($document->getType() != 'raw') { $url = JURI::base() . 'index.php?option=com_akeeba&view=light&format=raw'; $this->setRedirect($url); $this->redirect(); return true; } // Map default/unknown tasks to "browse" if (!in_array($task, array('authenticate', 'step', 'error', 'done'))) { $task = 'browse'; } parent::execute($task); }
public function execute($task) { // The only allowed task is the browse one $task = 'browse'; parent::execute($task); }
public function execute($task) { $task = 'force'; return parent::execute($task); }
public function execute($task) { $this->input->set('task', 'read', $this->input); $task = 'read'; parent::execute($task); }
public function execute($task) { $task = 'add'; $this->input->set('task', $task); parent::execute($task); }
public function execute($task) { $task = 'cron'; $this->input->set('task', 'cron'); parent::execute($task); }
public function execute($task) { $task = 'json'; parent::execute($task); }