當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Board::getModeratedBoards方法代碼示例

本文整理匯總了PHP中Board::getModeratedBoards方法的典型用法代碼示例。如果您正苦於以下問題:PHP Board::getModeratedBoards方法的具體用法?PHP Board::getModeratedBoards怎麽用?PHP Board::getModeratedBoards使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Board的用法示例。


在下文中一共展示了Board::getModeratedBoards方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: readPostIDs

 /**
  * @see PostList::readPostIDs()
  */
 protected function readPostIDs()
 {
     $boardIDs = Board::getModeratedBoards('canEditPost');
     $boardIDs2 = Board::getModeratedBoards('canReadDeletedPost');
     if (!empty($boardIDs)) {
         $sql = "SELECT\t\treport.postID\n\t\t\t\tFROM\t\twbb" . WBB_N . "_post_report report\n\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_post post\n\t\t\t\tON\t\t(post.postID = report.postID)\n\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_thread thread\n\t\t\t\tON\t\t(thread.threadID = post.threadID)\n\t\t\t\tWHERE\t\tthread.boardID IN (" . $boardIDs . ")\n\t\t\t\t\t\tAND (post.isDeleted = 0" . (!empty($boardIDs2) ? " OR thread.boardID IN (" . $boardIDs2 . ")" : '') . ")\n\t\t\t\tORDER BY\treport.reportTime DESC";
         $result = WCF::getDB()->sendQuery($sql, $this->limit, $this->offset);
         while ($row = WCF::getDB()->fetchArray($result)) {
             if (!empty($this->postIDs)) {
                 $this->postIDs .= ',';
             }
             $this->postIDs .= $row['postID'];
         }
     }
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:18,代碼來源:ReportsPostList.class.php

示例2: execute

 /**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // check permissions
     $boardIDs = Board::getModeratedBoards('canDeleteThreadCompletely');
     if (empty($boardIDs)) {
         throw new PermissionDeniedException();
     }
     // delete threads
     $threadIDArray = array();
     $sql = "SELECT\tthreadID\n\t\t\tFROM\twbb" . WBB_N . "_thread\n\t\t\tWHERE\tisDeleted = 1\n\t\t\t\tAND boardID IN (" . $boardIDs . ")";
     $result = WCF::getDB()->sendQuery($sql);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $threadIDArray[] = $row['threadID'];
     }
     if (count($threadIDArray)) {
         ThreadEditor::deleteAllCompletely(implode(',', $threadIDArray));
     }
     $this->executed();
     // forward
     HeaderUtil::redirect('index.php?page=ModerationDeletedThreads' . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:26,代碼來源:EmptyThreadRecycleBinAction.class.php

示例3: getOutstandingModerations

 /**
  * Returns the number of outstanding thread / post moderations.
  * 
  * @return	integer
  */
 public function getOutstandingModerations()
 {
     if ($this->outstandingModerations === null) {
         $this->outstandingModerations = WCF::getSession()->getVar('outstandingModerations');
         if ($this->outstandingModerations === null) {
             $this->outstandingModerations = 0;
             require_once WBB_DIR . 'lib/data/board/Board.class.php';
             // disabled threads
             $boardIDs = Board::getModeratedBoards('canEnableThread');
             if (!empty($boardIDs)) {
                 $sql = "SELECT\tCOUNT(*) AS count\n\t\t\t\t\t\tFROM\twbb" . WBB_N . "_thread\n\t\t\t\t\t\tWHERE\tisDisabled = 1\n\t\t\t\t\t\t\tAND boardID IN (" . $boardIDs . ")\n\t\t\t\t\t\t\tAND movedThreadID = 0";
                 $row = WCF::getDB()->getFirstRow($sql);
                 $this->outstandingModerations += $row['count'];
             }
             // disabled posts
             $boardIDs = Board::getModeratedBoards('canEnablePost');
             if (!empty($boardIDs)) {
                 $sql = "SELECT\t\tCOUNT(*) AS count\n\t\t\t\t\t\tFROM\t\twbb" . WBB_N . "_post post\n\t\t\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_thread thread\n\t\t\t\t\t\tON\t\t(thread.threadID = post.threadID)\n\t\t\t\t\t\tWHERE\t\tpost.isDisabled = 1\n\t\t\t\t\t\t\t\tAND thread.boardID IN (" . $boardIDs . ")";
                 $row = WCF::getDB()->getFirstRow($sql);
                 $this->outstandingModerations += $row['count'];
             }
             // reported posts
             $boardIDs = Board::getModeratedBoards('canEditPost');
             $boardIDs2 = Board::getModeratedBoards('canReadDeletedPost');
             if (!empty($boardIDs)) {
                 $sql = "SELECT\t\tCOUNT(*) AS count\n\t\t\t\t\t\tFROM\t\twbb" . WBB_N . "_post_report report\n\t\t\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_post post\n\t\t\t\t\t\tON\t\t(post.postID = report.postID)\n\t\t\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_thread thread\n\t\t\t\t\t\tON\t\t(thread.threadID = post.threadID)\n\t\t\t\t\t\tWHERE\t\tthread.boardID IN (" . $boardIDs . ")\n\t\t\t\t\t\t\t\tAND (post.isDeleted = 0" . (!empty($boardIDs2) ? " OR thread.boardID IN (" . $boardIDs2 . ")" : '') . ")";
                 $row = WCF::getDB()->getFirstRow($sql);
                 $this->outstandingModerations += $row['count'];
             }
             WCF::getSession()->register('outstandingModerations', $this->outstandingModerations);
         }
     }
     return $this->outstandingModerations;
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:39,代碼來源:WBBUserSession.class.php

示例4: __construct

 /**
  * Creates a new ModerationDeletedThreadsPage object.
  */
 public function __construct()
 {
     $boardIDs = Board::getModeratedBoards('canReadDeletedThread');
     $this->sqlConditions .= ' AND thread.boardID IN (' . (!empty($boardIDs) ? $boardIDs : 0) . ')';
     parent::__construct();
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:9,代碼來源:ModerationDeletedThreadsPage.class.php

示例5: countReports

 /**
  * Counts the reported posts.
  */
 protected function countReports()
 {
     $boardIDs = Board::getModeratedBoards('canEditPost');
     $boardIDs2 = Board::getModeratedBoards('canReadDeletedPost');
     if (!empty($boardIDs)) {
         $sql = "SELECT\t\tCOUNT(*) AS count\n\t\t\t\tFROM\t\twbb" . WBB_N . "_post_report report\n\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_post post\n\t\t\t\tON\t\t(post.postID = report.postID)\n\t\t\t\tLEFT JOIN\twbb" . WBB_N . "_thread thread\n\t\t\t\tON\t\t(thread.threadID = post.threadID)\n\t\t\t\tWHERE\t\tthread.boardID IN (" . $boardIDs . ")\n\t\t\t\t\t\tAND (post.isDeleted = 0" . (!empty($boardIDs2) ? " OR thread.boardID IN (" . $boardIDs2 . ")" : '') . ")";
         $row = WCF::getDB()->getFirstRow($sql);
         $this->reports = $row['count'];
     }
 }
開發者ID:joaocustodio,項目名稱:EmuDevstore-1,代碼行數:13,代碼來源:ModerationOverviewPage.class.php


注:本文中的Board::getModeratedBoards方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。