/**
  * @see	\wcf\system\moderation\queue\IModerationQueueHandler::removeQueues()
  */
 public function removeQueues(array $objectIDs)
 {
     $objectTypeID = ModerationQueueManager::getInstance()->getObjectTypeID($this->definitionName, $this->objectType);
     if ($objectTypeID === null) {
         throw new SystemException("Object type '" . $this->objectType . "' is not valid for definition '" . $this->definitionName . "'");
     }
     $conditions = new PreparedStatementConditionBuilder();
     $conditions->add("objectTypeID = ?", array($objectTypeID));
     $conditions->add("objectID IN (?)", array($objectIDs));
     $sql = "SELECT\tqueueID\n\t\t\tFROM\twcf" . WCF_N . "_moderation_queue\n\t\t\t" . $conditions;
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute($conditions->getParameters());
     $queueIDs = array();
     while ($row = $statement->fetchArray()) {
         $queueIDs[] = $row['queueID'];
     }
     if (!empty($queueIDs)) {
         $queueAction = new ModerationQueueAction($queueIDs, 'delete');
         $queueAction->executeAction();
     }
 }
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST)) {
         $this->assignedUserID = $this->queue->assignedUserID;
     }
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.moderation.moderation'), LinkHandler::getInstance()->getLink('ModerationList')));
     $this->commentObjectTypeID = CommentHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue');
     $this->commentManager = CommentHandler::getInstance()->getObjectType($this->commentObjectTypeID)->getProcessor();
     $this->commentList = CommentHandler::getInstance()->getCommentList($this->commentManager, $this->commentObjectTypeID, $this->queueID);
     // update queue visit
     if ($this->queue->isNew()) {
         $action = new ModerationQueueAction(array($this->queue->getDecoratedObject()), 'markAsRead', array('visitTime' => TIME_NOW));
         $action->executeAction();
     }
 }
 /**
  * @see	\wcf\system\moderation\queue\AbstractModerationQueueManager::addEntry()
  */
 protected function addEntry($objectTypeID, $objectID, $containerID = 0, array $additionalData = array())
 {
     $sql = "SELECT\tqueueID\n\t\t\tFROM\twcf" . WCF_N . "_moderation_queue\n\t\t\tWHERE\tobjectTypeID = ?\n\t\t\t\tAND objectID = ?\n\t\t\t\tAND status <> ?";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($objectTypeID, $objectID, ModerationQueue::STATUS_DONE));
     $row = $statement->fetchArray();
     if ($row === false) {
         $objectAction = new ModerationQueueAction(array(), 'create', array('data' => array('objectTypeID' => $objectTypeID, 'objectID' => $objectID, 'containerID' => $containerID, 'userID' => WCF::getUser()->userID ?: null, 'time' => TIME_NOW, 'additionalData' => serialize($additionalData))));
         $objectAction->executeAction();
     } else {
         $objectAction = new ModerationQueueAction(array($row['queueID']), 'update', array('data' => array('status' => ModerationQueue::STATUS_OUTSTANDING, 'containerID' => $containerID, 'userID' => WCF::getUser()->userID ?: null, 'time' => TIME_NOW, 'additionalData' => serialize($additionalData))));
         $objectAction->executeAction();
     }
     ModerationQueueManager::getInstance()->resetModerationCount();
 }
 /**
  * Marks a list of moderation queue entries as done.
  * 
  * @param	integer		$objectTypeID
  * @param	array<integer>	$objectIDs
  */
 protected function removeEntries($objectTypeID, array $objectIDs)
 {
     $queueList = new ModerationQueueList();
     $queueList->getConditionBuilder()->add("moderation_queue.objectTypeID = ?", array($objectTypeID));
     $queueList->getConditionBuilder()->add("moderation_queue.objectID IN (?)", array($objectIDs));
     $queueList->readObjects();
     if (count($queueList)) {
         $objectAction = new ModerationQueueAction($queueList->getObjects(), 'markAsDone');
         $objectAction->executeAction();
     }
 }