예제 #1
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 public function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf" . WCF_N . "_user user WHERE languageID = language.languageID) AS users,";
     $this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf" . WCF_N . "_language_item WHERE languageID = language.languageID) AS variables,";
     $this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf" . WCF_N . "_language_item WHERE languageID = language.languageID AND languageCustomItemValue IS NOT NULL) AS customVariables";
 }
예제 #2
0
 /**
  * @see	wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "cronjob.*";
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_cronjob cronjob ON (cronjob.cronjobID = cronjob_log.cronjobID)";
     $this->objectList->getConditionBuilder()->add("cronjob_log.cronjobID IN (SELECT cronjobID FROM wcf" . WCF_N . "_cronjob WHERE packageID IN (?))", array(PackageDependencyHandler::getInstance()->getDependencies()));
 }
 /**
  * Initializes DatabaseObjectList instance.
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->getConditionBuilder()->add('isActive = ?', array(1));
     $this->objectList->sqlSelects = 'user_table.username, paid_subscription.title';
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_user user_table ON (user_table.userID = paid_subscription_user.userID)";
     $this->objectList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription ON (paid_subscription.subscriptionID = paid_subscription_user.subscriptionID)";
 }
예제 #4
0
	/**
	 * @see	wcf\page\MultipleLinkPage::initObjectList()
	 */
	public function initObjectList() {
		parent::initObjectList();
		
		$this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf".WCF_N."_user user WHERE languageID = language.languageID) AS users,";
		$this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf".WCF_N."_language_item WHERE languageID = language.languageID) AS variables,";
		$this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf".WCF_N."_language_item WHERE languageID = language.languageID AND languageCustomItemValue <> NULL) AS customVariables";
		$this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder;
	}
예제 #5
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf" . WCF_N . "_tag_to_object t2o WHERE t2o.tagID = tag.tagID) AS usageCount";
     $this->objectList->sqlSelects .= ", language.languageName, language.languageCode";
     $this->objectList->sqlSelects .= ", synonym.name AS synonymName";
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_language language ON tag.languageID = language.languageID";
     $this->objectList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_tag synonym ON tag.synonymFor = synonym.tagID";
     if ($this->search !== '') {
         $this->objectList->getConditionBuilder()->add('tag.name LIKE ?', array($this->search . '%'));
     }
 }
 /**
  * Initializes DatabaseObjectList instance.
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     if ($this->transactionID) {
         $this->objectList->getConditionBuilder()->add('paid_subscription_transaction_log.transactionID LIKE ?', array('%' . $this->transactionID . '%'));
     }
     if ($this->username) {
         $this->objectList->getConditionBuilder()->add('paid_subscription_transaction_log.userID IN (SELECT userID FROM wcf' . WCF_N . '_user WHERE username LIKE ?)', array('%' . $this->username . '%'));
     }
     if ($this->subscriptionID) {
         $this->objectList->getConditionBuilder()->add('paid_subscription_transaction_log.subscriptionID = ?', array($this->subscriptionID));
     }
     $this->objectList->sqlSelects = 'user_table.username, paid_subscription.title';
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_user user_table ON (user_table.userID = paid_subscription_transaction_log.userID)";
     $this->objectList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription ON (paid_subscription.subscriptionID = paid_subscription_transaction_log.subscriptionID)";
 }
예제 #7
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->readStats();
     $this->objectList->checkRecord();
     if (!USERS_ONLINE_SHOW_ROBOTS) {
         $this->objectList->getConditionBuilder()->add('session.spiderID IS NULL');
     }
     if (!USERS_ONLINE_SHOW_GUESTS) {
         if (USERS_ONLINE_SHOW_ROBOTS) {
             $this->objectList->getConditionBuilder()->add('(session.userID IS NOT NULL OR session.spiderID IS NOT NULL)');
         } else {
             $this->objectList->getConditionBuilder()->add('session.userID IS NOT NULL');
         }
     }
 }
예제 #8
0
	/**
	 * @see	wcf\page\MultipleLinkPage::initObjectList()
	 */
	public function initObjectList() {
		parent::initObjectList();
		
		$this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder;
	}
예제 #9
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     if ($this->search !== null) {
         $searchData = unserialize($this->search->searchData);
         $this->objectList->getConditionBuilder()->add("user_table.userID IN (?)", array($searchData['matches']));
         unset($searchData);
     }
     if (!empty($this->letter)) {
         if ($this->letter == '#') {
             // PostgreSQL
             if (WCF::getDB() instanceof PostgreSQLDatabase) {
                 $this->objectList->getConditionBuilder()->add("SUBSTRING(username FROM 1 for 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')");
             } else {
                 // MySQL
                 $this->objectList->getConditionBuilder()->add("SUBSTRING(username,1,1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')");
             }
         } else {
             $this->objectList->getConditionBuilder()->add("username LIKE ?", array($this->letter . '%'));
         }
     }
 }
예제 #10
0
 /**
  * @see	\wcf\page\MultipleLinkPage::show()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = 'user_group.groupName';
     $this->objectList->sqlJoins = 'LEFT JOIN wcf' . WCF_N . '_user_group user_group ON (user_group.groupID = user_rank.groupID)';
 }
예제 #11
0
 /**
  * @see	wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->getConditionBuilder()->add("user_jcoins_statement.userID = ? AND user_jcoins_statement.isTrashed = 0", array(WCF::getUser()->userID));
 }
예제 #12
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "label_group.groupName, label_group.groupDescription";
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_label_group label_group ON (label_group.groupID = label.groupID)";
 }
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf" . WCF_N . "_template WHERE templateGroupID = template_group.templateGroupID) AS templates";
 }
예제 #14
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     if ($this->templateGroupID) {
         $this->objectList->getConditionBuilder()->add('template.templateGroupID = ?', array($this->templateGroupID));
     } else {
         $this->objectList->getConditionBuilder()->add('template.templateGroupID IS NULL');
     }
     if ($this->searchTemplateName) {
         $this->objectList->getConditionBuilder()->add('templateName LIKE ?', array('%' . $this->searchTemplateName . '%'));
     }
     if ($this->application) {
         $this->objectList->getConditionBuilder()->add('application = ?', array($this->application));
     }
 }
예제 #15
0
 /**
  * @see	wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->getConditionBuilder()->add('sessionLogID = ?', array($this->sessionLogID));
 }
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     if ($this->category) {
         $this->objectList = new CategoryEntryList(array($this->category->categoryID));
     } else {
         parent::initObjectList();
         if ($this->user) {
             $this->objectList->getConditionBuilder()->add('entry.userID = ?', array($this->user->userID));
         }
     }
 }
예제 #17
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf" . WCF_N . "_user_to_group WHERE groupID = user_group.groupID) AS members";
 }
예제 #18
0
 /**
  * @see	wcf\page\MultipleLinkPage::initObjectList()
  */
 public function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->getConditionBuilder()->add("cronjob.packageID IN (?)", array(PackageDependencyHandler::getInstance()->getDependencies()));
     $this->sqlOrderBy = "cronjob." . $this->sortField . " " . $this->sortOrder;
 }
예제 #19
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     // filter by object type id
     $objectTypeIDs = ModerationQueueManager::getInstance()->getObjectTypeIDs($this->definitionID ? array($this->definitionID) : array_keys($this->availableDefinitions));
     if (empty($objectTypeIDs)) {
         // no object type ids given? screw that, display nothing
         $this->objectList->getConditionBuilder()->add("0 = 1");
         return;
     }
     $this->objectList->getConditionBuilder()->add("moderation_queue.objectTypeID IN (?)", array($objectTypeIDs));
     // filter by assigned user id
     if ($this->assignedUserID == 0) {
         $this->objectList->getConditionBuilder()->add("moderation_queue.assignedUserID IS NULL");
     } else {
         if ($this->assignedUserID > 0) {
             $this->objectList->getConditionBuilder()->add("moderation_queue.assignedUserID = ?", array($this->assignedUserID));
         }
     }
     // filter by status
     if ($this->status == ModerationQueue::STATUS_DONE) {
         $this->objectList->getConditionBuilder()->add("moderation_queue.status IN (?)", array(array(ModerationQueue::STATUS_DONE, ModerationQueue::STATUS_CONFIRMED, ModerationQueue::STATUS_REJECTED)));
     } else {
         $this->objectList->getConditionBuilder()->add("moderation_queue.status IN (?)", array(array(ModerationQueue::STATUS_OUTSTANDING, ModerationQueue::STATUS_PROCESSING)));
     }
 }
예제 #20
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "cronjob.*";
     $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_cronjob cronjob ON (cronjob.cronjobID = cronjob_log.cronjobID)";
 }
예제 #21
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->getConditionBuilder()->add("option_table.categoryName IN (SELECT categoryName FROM wcf" . WCF_N . "_user_option_category WHERE parentCategoryName = ?)", array('profile'));
 }
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->setEntry($this->entry->getDecoratedObject());
 }
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf" . WCF_N . "_user_option WHERE categoryName = user_option_category.categoryName) AS userOptions";
     $this->objectList->getConditionBuilder()->add('user_option_category.parentCategoryName = ?', array('profile'));
 }
예제 #24
0
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList
  */
 protected function initObjectList()
 {
     parent::initObjectList();
     $objectTypeIDs = array();
     foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.attachment.objectType') as $objectType) {
         if (!$objectType->private) {
             $objectTypeIDs[] = $objectType->objectTypeID;
         }
     }
     if (!empty($objectTypeIDs)) {
         $this->objectList->getConditionBuilder()->add('attachment.objectTypeID IN (?)', array($objectTypeIDs));
     } else {
         $this->objectList->getConditionBuilder()->add('1 = 0');
     }
     $this->objectList->getConditionBuilder()->add("attachment.tmpHash = ''");
     // get data
     $this->stats = $this->objectList->getStats();
     $this->availableFileTypes = $this->objectList->getAvailableFileTypes();
     // filter
     if (!empty($this->username)) {
         $user = User::getUserByUsername($this->username);
         if ($user->userID) {
             $this->objectList->getConditionBuilder()->add('attachment.userID = ?', array($user->userID));
         }
     }
     if (!empty($this->filename)) {
         $this->objectList->getConditionBuilder()->add('attachment.filename LIKE ?', array($this->filename . '%'));
     }
     if (!empty($this->fileType)) {
         $this->objectList->getConditionBuilder()->add('attachment.fileType LIKE ?', array($this->fileType));
     }
 }
 /**
  * @see	\wcf\page\MultipleLinkPage::initObjectList()
  */
 protected function initObjectList()
 {
     if ($this->categoryID) {
         $this->objectList = new NewsCategoryList(array($this->categoryID));
     } else {
         parent::initObjectList();
     }
     // letter filter
     if (!empty($this->letter)) {
         if ($this->letter == '#') {
             $this->objectList->getConditionBuilder()->add("SUBSTRING(news.subject,1,1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')");
         } else {
             $this->objectList->getConditionBuilder()->add("news.subject LIKE ?", array($this->letter . '%'));
         }
     }
 }