/**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     $please_enable = $request->get('cardwall_on_top');
     $tracker_id = $this->tracker->getId();
     $is_enabled = $this->dao->isEnabled($tracker_id);
     if ($please_enable) {
         if (!$is_enabled) {
             $this->dao->enable($tracker_id);
             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_enabled'));
         }
     } else {
         if ($is_enabled) {
             $this->dao->disable($tracker_id);
             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_disabled'));
         }
     }
 }
Ejemplo n.º 2
0
 public function disable()
 {
     return $this->dao->disable($this->tracker->getId());
 }