当前位置: 首页>>代码示例>>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;未经允许,请勿转载。