示例#1
0
文件: History.php 项目: sinfocol/gwf3
 private function sanitize()
 {
     $this->threads = GDO::table('GWF_ForumThread');
     $this->conditions = sprintf('thread_postcount>0 AND (%s) AND thread_options&%d=0', GWF_ForumThread::getPermQuery(), GWF_ForumThread::IN_MODERATION | GWF_ForumThread::INVISIBLE);
     $this->nThreads = $this->threads->countRows($this->conditions);
     $this->tpp = $this->module->getThreadsPerPage();
     $this->nPages = GWF_PageMenu::getPagecount($this->tpp, $this->nThreads);
     $this->page = Common::clamp(Common::getGet('page', $this->nPages), 1, $this->nPages);
     $this->by = $_GET['by'] = Common::getGet('by', 'thread_lastdate');
     $this->dir = $_GET['dir'] = Common::getGet('dir', 'ASC');
     $this->orderby = $this->threads->getMultiOrderby($this->by, $this->dir);
 }