public static function sendModerateThread(Module_Forum $module, GWF_ForumThread $thread, $message) { $boardtxt = self::getBoardTreeText($thread->getBoard()); $threadtxt = $thread->display('thread_title'); $usertxt = $thread->display('thread_lastposter'); $title = $threadtxt; $tid = $thread->getID(); $token = $thread->getToken(); $addtxt = Common::getAbsoluteURL('index.php?mo=Forum&me=Moderate&yes_thread=' . $tid . '&token=' . $token); $remtxt = Common::getAbsoluteURL('index.php?mo=Forum&me=Moderate&no_thread=' . $tid . '&token=' . $token); return self::sendModMail($module, $boardtxt, $threadtxt, $usertxt, $title, $message, $addtxt, $remtxt); }
private function onMove(GWF_ForumThread $t, GWF_ForumBoard $b) { // if (false === ($b->isThreadAllowed())) { // $_POST['move'] = $t->getBoardID(); // return $this->module->error('err_no_thread_allowed'); // } $pc = $t->getPostCount(); if (false === $t->getBoard()->adjustCounters(-1, -$pc)) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } if (false === $b->adjustCounters(1, $pc)) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } if (false === $t->saveVars(array('thread_bid' => $b->getID(), 'thread_gid' => $b->getGroupID()))) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } if (false === $t->saveVar('thread_bid', $b->getID())) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } return $this->module->message('msg_thread_moved', array($t->display('thread_title'), $b->display('board_title'))); }