Esempio n. 1
0
 public function onCreateThread(Module_WeChall $module)
 {
     if (false !== ($thread = $this->getThread())) {
         return true;
     }
     $title = 'Comments on ' . $this->getSitename();
     $options = GWF_ForumThread::GUEST_VIEW;
     $thread = GWF_ForumThread::fakeThread($module->cfgWeChallUser(), $title, $this->getBoardID(), 0, 0, $options);
     if (false === $thread->insert()) {
         return false;
     }
     if (false === $this->saveVar('site_threadid', $thread->getID())) {
         return false;
     }
     return $thread->onApprove(false, 0);
 }