/** * Change the Status of a controller (enabled/disabled) * * @view views/scripts/controller/status.phtml * @access public */ public function statusAction() { $ctrlRow = new Admin_Model_DbRow_Controller($this->dbCtrl->find($this->checkControllerIdParam())); $ctrlRow->set('enabled', $ctrlRow->get('enabled') == 1 ? 0 : 1); $this->dbCtrl->update($ctrlRow->toDbArray(array('enabled')), $ctrlRow->get('id')); // disabled all actions too, they are relevant in the ACL if ($ctrlRow->get('enabled') === 0) { $actionRow = new Admin_Model_DbRow_Action(array('enabled' => 0)); $actionDbModel = new Admin_Model_DbTable_Acl_Action(); $actionDbModel->updateWithControllerId($actionRow->toDbArray(array('enabled')), $ctrlRow->get('id')); } $this->_redirect('admin/controller/index'); }