protected function search()
{
$this->userList = new UserList();
- $this->userList->sqlConditionJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
+ $this->userList->sqlConditionJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID";
$this->userList->sqlLimit = $this->maxResults;
EventHandler::getInstance()->fireAction($this, 'search');
parent::initObjectList();
$this->objectList->sqlSelects = "cronjob.*";
- $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_cronjob cronjob ON cronjob.cronjobID = cronjob_log.cronjobID";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_cronjob cronjob
+ ON cronjob.cronjobID = cronjob_log.cronjobID";
if ($this->cronjobID) {
$this->objectList->getConditionBuilder()->add('cronjob_log.cronjobID = ?', [$this->cronjobID]);
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";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_label_group label_group
+ ON label_group.groupID = label.groupID";
if ($this->labelGroup) {
$this->objectList->getConditionBuilder()->add('label.groupID = ?', [$this->labelGroup->groupID]);
}
$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";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = paid_subscription_transaction_log.userID
+ LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription
+ ON paid_subscription.subscriptionID = paid_subscription_transaction_log.subscriptionID";
}
/**
$this->objectList->getConditionBuilder()->add('paid_subscription_user.isActive = ?', [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";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = paid_subscription_user.userID
+ LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription
+ ON paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
}
/**
$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";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_language language
+ ON tag.languageID = language.languageID
+ LEFT JOIN wcf" . WCF_N . "_tag synonym
+ ON tag.synonymFor = synonym.tagID";
if ($this->search !== '') {
$this->objectList->getConditionBuilder()->add('tag.name LIKE ?', [$this->search . '%']);
// get user ids
$sql = "SELECT user_table.userID
FROM wcf" . WCF_N . "_user user_table
- " . (isset($this->options[$this->sortField]) ? "LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID" : '') . "
+ " . (isset($this->options[$this->sortField]) ? "
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID
+ " : '') . "
" . $this->conditions . "
ORDER BY " . (($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'user_option_value.userOption' . $this->options[$this->sortField]->optionID : $this->sortField) . " " . $this->sortOrder;
$statement = WCF::getDB()->prepareStatement(
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';
+ $this->objectList->sqlJoins = '
+ LEFT JOIN wcf' . WCF_N . '_user_group user_group
+ ON user_group.groupID = user_rank.groupID';
}
}
$this->sqlSelects .= ',';
}
$this->sqlSelects .= 'tracked_visit.visitTime';
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_tracked_visit tracked_visit ON tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . " AND tracked_visit.objectID = article.articleID AND tracked_visit.userID = " . WCF::getUser()->userID;
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_tracked_visit tracked_visit
+ ON tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
+ AND tracked_visit.objectID = article.articleID
+ AND tracked_visit.userID = " . WCF::getUser()->userID;
}
if (!empty($this->sqlSelects)) {
$this->sqlSelects .= ',';
}
$this->sqlSelects .= "like_object.cachedReactions";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_like_object like_object ON like_object.objectTypeID = " . ReactionHandler::getInstance()->getObjectType('com.woltlab.wcf.likeableArticle')->objectTypeID . " AND like_object.objectID = article.articleID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_like_object like_object
+ ON like_object.objectTypeID = " . ReactionHandler::getInstance()->getObjectType('com.woltlab.wcf.likeableArticle')->objectTypeID . "
+ AND like_object.objectID = article.articleID";
}
/**
parent::__construct();
$this->sqlSelects = 'user_table.username';
- $this->sqlJoins = " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = attachment.userID";
+ $this->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = attachment.userID";
}
/**
$searchString = '%' . \addcslashes($searchString, '_%') . '%';
- $this->sqlConditionJoins .= ' LEFT JOIN wcf' . WCF_N . '_media_content media_content ON media_content.mediaID = media.mediaID';
+ $this->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_media_content media_content
+ ON media_content.mediaID = media.mediaID';
$conditionBuilder = new PreparedStatementConditionBuilder(false, 'OR');
$conditionBuilder->add('media_content.title LIKE ?', [$searchString]);
// fetch content data
$this->sqlSelects .= "media_content.*, COALESCE(media.languageID, " . $languageID . ") AS localizedLanguageID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_media_content media_content ON media_content.mediaID = media.mediaID AND media_content.languageID = COALESCE(media.languageID, " . $languageID . ")";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_media_content media_content
+ ON media_content.mediaID = media.mediaID
+ AND media_content.languageID = COALESCE(media.languageID, " . $languageID . ")";
}
}
$this->sqlSelects = "moderation_queue.*, assigned_user.username AS assignedUsername, user_table.username";
$this->sqlConditionJoins = ", wcf" . WCF_N . "_moderation_queue moderation_queue";
$this->sqlJoins = ", wcf" . WCF_N . "_moderation_queue moderation_queue";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user assigned_user ON assigned_user.userID = moderation_queue.assignedUserID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = moderation_queue.userID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user assigned_user
+ ON assigned_user.userID = moderation_queue.assignedUserID
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = moderation_queue.userID";
$this->getConditionBuilder()->add("moderation_queue_to_user.queueID = moderation_queue.queueID");
$this->getConditionBuilder()->add("moderation_queue_to_user.userID = ?", [WCF::getUser()->userID]);
$this->getConditionBuilder()->add("moderation_queue_to_user.isAffected = ?", [1]);
parent::__construct();
$this->sqlSelects = 'package.package, template_group.templateGroupFolderName';
- $this->sqlJoins = " LEFT JOIN wcf" . WCF_N . "_package package ON package.packageID = template.packageID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_template_group template_group ON template_group.templateGroupID = template.templateGroupID";
+ $this->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_package package
+ ON package.packageID = template.packageID
+ LEFT JOIN wcf" . WCF_N . "_template_group template_group
+ ON template_group.templateGroupID = template.templateGroupID";
}
/**
if (!empty($userTrophyList->sqlJoins)) {
$userTrophyList->sqlJoins .= ' ';
}
- $userTrophyList->sqlJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
- $userTrophyList->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
+ $userTrophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
$userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
$userTrophyList->getConditionBuilder()->add('category.isDisabled = ?', [0]);
$this->sqlSelects .= ',';
}
$this->sqlSelects .= "user_option_value.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID";
}
}
$this->sqlSelects .= ',';
}
$this->sqlSelects .= "user_avatar.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID";
if (MODULE_USER_RANK) {
$this->sqlSelects .= ",user_rank.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_rank user_rank ON user_rank.rankID = user_table.rankID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_rank user_rank
+ ON user_rank.rankID = user_table.rankID";
}
// get current location
$this->sqlSelects .= ", session.pageID, session.pageObjectID, session.lastActivityTime AS sessionLastActivityTime";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_session session ON session.userID = user_table.userID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_session session
+ ON session.userID = user_table.userID";
}
/**
$this->sqlSelects .= "user_table.username, user_table.email, user_table.disableAvatar, user_table.enableGravatar, user_table.gravatarFileExtension";
$this->sqlSelects .= ", user_avatar.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = user_follow.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = user_follow.userID
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID";
}
}
$this->sqlSelects .= "user_avatar.*, user_follow.followID, user_option_value.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = user_follow.followUserID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = user_follow.followUserID
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID";
if (MODULE_USER_RANK) {
$this->sqlSelects .= ",user_rank.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_rank user_rank ON user_rank.rankID = user_table.rankID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_rank user_rank
+ ON user_rank.rankID = user_table.rankID";
}
$this->sqlSelects .= ", user_table.*";
$this->sqlSelects .= ", user_option_value.*";
$this->sqlSelects .= ", user_avatar.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = user_ignore.ignoreUserID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = user_ignore.ignoreUserID
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID";
if (MODULE_USER_RANK) {
$this->sqlSelects .= ",user_rank.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_rank user_rank ON user_rank.rankID = user_table.rankID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_rank user_rank
+ ON user_rank.rankID = user_table.rankID";
}
$this->sqlSelects .= ", user_table.*";
*/
public function __construct()
{
- $this->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = event_to_user.userID";
+ $this->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = event_to_user.userID";
$this->sqlSelects = 'user_table.*';
parent::__construct();
$this->sqlSelects .= "user_avatar.*, user_option_value.*, user_group.userOnlineMarking, user_table.*";
- $this->sqlConditionJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = session.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = session.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_group user_group ON user_group.groupID = user_table.userOnlineGroupID";
+ $this->sqlConditionJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = session.userID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = session.userID
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID
+ LEFT JOIN wcf" . WCF_N . "_user_group user_group
+ ON user_group.groupID = user_table.userOnlineGroupID";
$this->getConditionBuilder()->add('session.lastActivityTime > ?', [TIME_NOW - USER_ONLINE_TIMEOUT]);
}
$this->sqlSelects .= "user_table.username, user_table.email, user_table.disableAvatar, user_table.enableGravatar, user_table.gravatarFileExtension";
$this->sqlSelects .= ", user_avatar.*";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user user_table ON user_table.userID = user_profile_visitor.userID";
- $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
+ $this->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user user_table
+ ON user_table.userID = user_profile_visitor.userID
+ LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar
+ ON user_avatar.avatarID = user_table.avatarID";
}
}
if (!empty($userTrophyList->sqlConditionJoins)) {
$userTrophyList->sqlConditionJoins .= ' ';
}
- $userTrophyList->sqlJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
- $userTrophyList->sqlConditionJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
+ $userTrophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
+ $userTrophyList->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
// trophy category join
- $userTrophyList->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
- $userTrophyList->sqlConditionJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
+ $userTrophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
+ $userTrophyList->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
$userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
$userTrophyList->getConditionBuilder()->add('category.isDisabled = ?', [0]);
if (!empty($trophyList->sqlConditionJoins)) {
$trophyList->sqlConditionJoins .= ' ';
}
- $trophyList->sqlJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
- $trophyList->sqlConditionJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
+ $trophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
+ $trophyList->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
// trophy category join
- $trophyList->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
- $trophyList->sqlConditionJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
+ $trophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
+ $trophyList->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
$trophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
$trophyList->getConditionBuilder()->add('category.isDisabled = ?', [0]);
);
if (WCF::getUser()->userID) {
- $this->objectList->sqlConditionJoins = "LEFT JOIN wcf" . WCF_N . "_tracked_visit tracked_visit ON tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . " AND tracked_visit.objectID = article.articleID AND tracked_visit.userID = " . WCF::getUser()->userID;
+ $this->objectList->sqlConditionJoins = "
+ LEFT JOIN wcf" . WCF_N . "_tracked_visit tracked_visit
+ ON tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
+ AND tracked_visit.objectID = article.articleID
+ AND tracked_visit.userID = " . WCF::getUser()->userID;
$this->objectList->getConditionBuilder()->add("(article.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)");
}
}
{
$accessibleCategoryIDs = ArticleCategory::getAccessibleCategoryIDs();
if (!empty($accessibleCategoryIDs)) {
- $commentList->sqlJoins .= ' INNER JOIN wcf' . WCF_N . '_article_content article_content ON article_content.articleContentID = comment.objectID';
- $commentList->sqlJoins .= ' INNER JOIN wcf' . WCF_N . '_article article ON article.articleID = article_content.articleID';
+ $commentList->sqlJoins .= '
+ INNER JOIN wcf' . WCF_N . '_article_content article_content
+ ON article_content.articleContentID = comment.objectID
+ INNER JOIN wcf' . WCF_N . '_article article
+ ON article.articleID = article_content.articleID';
$commentList->sqlSelects = 'article_content.title';
$commentList->getConditionBuilder()->add('article.categoryID IN (?)', [$accessibleCategoryIDs]);
if (WCF::getSession()->getPermission('user.profile.canViewUserProfile')) {
$optionID = User::getUserOptionID('canViewProfile');
- $commentList->sqlJoins .= ' INNER JOIN wcf' . WCF_N . '_user_option_value user_option_value ON user_option_value.userID = comment.objectID';
+ $commentList->sqlJoins .= '
+ INNER JOIN wcf' . WCF_N . '_user_option_value user_option_value
+ ON user_option_value.userID = comment.objectID';
if (WCF::getUser()->userID) {
$followers = UserProfileHandler::getInstance()->getFollowers();
if (!empty($list->sqlConditionJoins)) {
$list->sqlConditionJoins .= ' ';
}
- $list->sqlJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
- $list->sqlConditionJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
+ $list->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
+ $list->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID';
// trophy category join
- $list->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
- $list->sqlConditionJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
+ $list->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
+ $list->sqlConditionJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
$list->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
$list->getConditionBuilder()->add('category.isDisabled = ?', [0]);
{
$list = new CategoryList();
$list->sqlSelects = "object_type.objectType";
- $list->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_object_type object_type ON object_type.objectTypeID = category.objectTypeID";
+ $list->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_object_type object_type
+ ON object_type.objectTypeID = category.objectTypeID";
$list->sqlOrderBy = "category.showOrder ASC";
$list->readObjects();
if (!empty($userTrophyList->sqlJoins)) {
$userTrophyList->sqlJoins .= ' ';
}
- $userTrophyList->sqlJoins .= 'LEFT JOIN wcf' . WCF_N . '_trophy trophy ON user_trophy.trophyID = trophy.trophyID';
- $userTrophyList->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_category category ON trophy.categoryID = category.categoryID';
+ $userTrophyList->sqlJoins .= '
+ LEFT JOIN wcf' . WCF_N . '_trophy trophy
+ ON user_trophy.trophyID = trophy.trophyID
+ LEFT JOIN wcf' . WCF_N . '_category category
+ ON trophy.categoryID = category.categoryID';
$userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
$userTrophyList->getConditionBuilder()->add('category.isDisabled = ?', [0]);
);
$paidSubscriptionUserList = new PaidSubscriptionUserList();
- $paidSubscriptionUserList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription ON paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
+ $paidSubscriptionUserList->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription
+ ON paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
$paidSubscriptionUserList->getConditionBuilder()->add('paid_subscription_user.endDate <> ?', [0]);
$paidSubscriptionUserList->getConditionBuilder()->add(
'(' . $conditionBuilder . ')',
$sql = "SELECT import_mapping.newID
FROM wcf" . WCF_N . "_import_mapping import_mapping
- " . ($tableName ? "LEFT JOIN " . $tableName . " object_table ON object_table." . $indexName . " = import_mapping.newID" : '') . "
+ " . ($tableName ? "
+ LEFT JOIN " . $tableName . " object_table
+ ON object_table." . $indexName . " = import_mapping.newID
+ " : '') . "
WHERE import_mapping.importHash = ?
AND import_mapping.objectTypeID = ?
AND import_mapping.oldID = ?
protected function forceUserAssignment()
{
$queueList = new ModerationQueueList();
- $queueList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user ON moderation_queue_to_user.queueID = moderation_queue.queueID AND moderation_queue_to_user.userID = " . WCF::getUser()->userID;
+ $queueList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
+ ON moderation_queue_to_user.queueID = moderation_queue.queueID
+ AND moderation_queue_to_user.userID = " . WCF::getUser()->userID;
$queueList->getConditionBuilder()->add("moderation_queue_to_user.queueID IS NULL");
$queueList->readObjects();
if (!empty($trophyList->sqlJoins)) {
$trophyList->sqlJoins .= ', ';
}
- $trophyList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_language_item language_item ON language_item.languageItem = trophy.title";
+ $trophyList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_language_item language_item
+ ON language_item.languageItem = trophy.title";
$trophyList->getConditionBuilder()->add(
'(trophy.title LIKE ? OR language_item.languageItemValue LIKE ?)',
['%' . $searchString . '%', '%' . $searchString . '%']
// check for user votes
if (WCF::getUser()->userID) {
$optionList->sqlSelects = "CASE WHEN poll_option_vote.optionID IS NULL THEN '0' ELSE '1' END AS voted";
- $optionList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_poll_option_vote poll_option_vote ON poll_option_vote.optionID = poll_option.optionID AND poll_option_vote.userID = " . WCF::getUser()->userID;
+ $optionList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_poll_option_vote poll_option_vote
+ ON poll_option_vote.optionID = poll_option.optionID
+ AND poll_option_vote.userID = " . WCF::getUser()->userID;
} else {
$optionList->sqlSelects = "'0' AS voted";
}
*/
public function getJoins()
{
- return 'INNER JOIN wcf' . WCF_N . '_article ON wcf' . WCF_N . '_article.articleID = ' . $this->getTableName() . '.articleID';
+ return '
+ INNER JOIN wcf' . WCF_N . '_article
+ ON wcf' . WCF_N . '_article.articleID = ' . $this->getTableName() . '.articleID';
}
/**
*/
public function getJoins()
{
- return 'INNER JOIN wcf' . WCF_N . '_page ON wcf' . WCF_N . '_page.pageID = ' . $this->getTableName() . '.pageID';
+ return '
+ INNER JOIN wcf' . WCF_N . '_page
+ ON wcf' . WCF_N . '_page.pageID = ' . $this->getTableName() . '.pageID';
}
/**
/** @var $pageList PageContentList */
$pageList = parent::getObjectList();
- $pageList->sqlConditionJoins = 'LEFT JOIN wcf' . WCF_N . '_page page ON page_content.pageID = page.pageID';
- $pageList->sqlJoins = 'LEFT JOIN wcf' . WCF_N . '_page page ON page_content.pageID = page.pageID';
+ $pageList->sqlConditionJoins = '
+ LEFT JOIN wcf' . WCF_N . '_page page
+ ON page_content.pageID = page.pageID';
+ $pageList->sqlJoins = '
+ LEFT JOIN wcf' . WCF_N . '_page page
+ ON page_content.pageID = page.pageID';
$pageList->getConditionBuilder()->add('page.isMultilingual = ?', [1]);
$pageList->getConditionBuilder()->add('page.allowSpidersToIndex = ?', [1]);
private function getUserIDs(Trophy $trophy)
{
$userList = new UserList();
- $userList->sqlConditionJoins .= " LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
+ $userList->sqlConditionJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID";
$conditions = $trophy->getConditions();
foreach ($conditions as $condition) {
$userList->sqlJoins = $pseudoUserList->sqlJoins;
// We joining the user_trophy table to receive the userTrophyID, which should be deleted.
- $userList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_trophy user_trophy ON user_table.userID = user_trophy.userID";
+ $userList->sqlJoins .= "
+ LEFT JOIN wcf" . WCF_N . "_user_trophy user_trophy
+ ON user_table.userID = user_trophy.userID";
// We do not need the complete user object, but only the userTrophyID.
// So that the UserList object can also assign the users (which is used
parent::initObjectList();
$this->objectList->sqlSelects = 'user_option_value.userOption' . User::getUserOptionID('aboutMe') . ' AS aboutMe';
- $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON user_option_value.userID = user_table.userID";
+ $this->objectList->sqlJoins = "
+ LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value
+ ON user_option_value.userID = user_table.userID";
$this->objectList->sqlOrderBy = 'user_table.userID';
}