示例#1
0
 /**
  * Enables or disables a source feed
  *
  * @return  void
  */
 public function statusTask()
 {
     $id = Request::getInt('id');
     $action = Request::getVar('action');
     $model = new Models\Feeds();
     if ($action == 'enable') {
         $model->updateActive($id, 1);
         // Output messsage and redirect
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller), Lang::txt('COM_FEEDAGGREGATOR_FEED_ENABLED'));
     } elseif ($action == 'disable') {
         $model->updateActive($id, 0);
         // Output messsage and redirect
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller), Lang::txt('COM_FEEDAGGREGATOR_FEED_DISABLED'));
     } else {
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller), Lang::txt('COM_FEEDAGGREGATOR_ERROR_ENABLE_DISABLE_FAILED'), 'error');
     }
 }