Example #1
0
 public function on_unlinkboard_Ac()
 {
     $argv = $this->argv();
     $argc = count($argv);
     if ($argc !== 1) {
         return $this->showHelp('unlinkboard');
     }
     if (false === ($board = self::getBoard($argv[0]))) {
         return $this->rply('err_board');
     }
     $abbo = new Dog_ForumAbbo("{$board->getID()}:0:0");
     $abbos = Dog_ForumAbbo::explodeAbbos($this->configAbbos());
     if (!Dog_ForumAbbo::containsAbbo($abbos, $abbo)) {
         return $this->rply('err_not_linked', array($board->displayName()));
     }
     foreach ($abbos as $i => $a) {
         $a instanceof Dog_ForumAbbo;
         if ($a->getForumID() === $abbo->getForumID()) {
             unset($abbos[$i]);
         }
     }
     $this->saveAbbos($abbos);
     $this->rply('msg_unlinked', array($board->displayName()));
 }