Remove unnecessary parentheses around join conditions
authorMatthias Schmidt <gravatronics@live.com>
Thu, 4 Feb 2021 16:15:11 +0000 (17:15 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 4 Feb 2021 16:15:11 +0000 (17:15 +0100)
83 files changed:
wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php
wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php
wcfsetup/install/files/lib/acp/page/CronjobLogListPage.class.php
wcfsetup/install/files/lib/acp/page/LabelListPage.class.php
wcfsetup/install/files/lib/acp/page/PaidSubscriptionTransactionLogListPage.class.php
wcfsetup/install/files/lib/acp/page/PaidSubscriptionUserListPage.class.php
wcfsetup/install/files/lib/acp/page/UserListPage.class.php
wcfsetup/install/files/lib/acp/page/UserRankListPage.class.php
wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php
wcfsetup/install/files/lib/data/acp/session/log/ACPSessionLog.class.php
wcfsetup/install/files/lib/data/acp/session/log/ACPSessionLogList.class.php
wcfsetup/install/files/lib/data/article/ViewableArticle.class.php
wcfsetup/install/files/lib/data/article/ViewableArticleList.class.php
wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php
wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponseProvider.class.php
wcfsetup/install/files/lib/data/devtools/missing/language/item/DevtoolsMissingLanguageItemAction.class.php
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php
wcfsetup/install/files/lib/data/media/MediaList.class.php
wcfsetup/install/files/lib/data/media/ViewableMediaList.class.php
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php
wcfsetup/install/files/lib/data/moderation/queue/ViewableModerationQueueList.class.php
wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php
wcfsetup/install/files/lib/data/style/Style.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/files/lib/data/template/Template.class.php
wcfsetup/install/files/lib/data/template/TemplateList.class.php
wcfsetup/install/files/lib/data/user/TeamList.class.php
wcfsetup/install/files/lib/data/user/User.class.php
wcfsetup/install/files/lib/data/user/UserAction.class.php
wcfsetup/install/files/lib/data/user/UserList.class.php
wcfsetup/install/files/lib/data/user/UserProfileAction.class.php
wcfsetup/install/files/lib/data/user/UserProfileList.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowerList.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowingList.class.php
wcfsetup/install/files/lib/data/user/group/UserGroup.class.php
wcfsetup/install/files/lib/data/user/ignore/ViewableUserIgnoreList.class.php
wcfsetup/install/files/lib/data/user/notification/event/recipient/UserNotificationEventRecipientList.class.php
wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php
wcfsetup/install/files/lib/data/user/profile/visitor/UserProfileVisitorList.class.php
wcfsetup/install/files/lib/form/UserSearchForm.class.php
wcfsetup/install/files/lib/page/CategoryArticleListPage.class.php
wcfsetup/install/files/lib/page/UnreadArticleListPage.class.php
wcfsetup/install/files/lib/system/background/job/NotificationEmailDeliveryBackgroundJob.class.php
wcfsetup/install/files/lib/system/box/ArticleCommentListBoxController.class.php
wcfsetup/install/files/lib/system/box/BoxHandler.class.php
wcfsetup/install/files/lib/system/box/ProfileCommentListBoxController.class.php
wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/CategoryCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserNotificationEventCacheBuilder.class.php
wcfsetup/install/files/lib/system/comment/CommentHandler.class.php
wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/ExpiringPaidSubscriptionUserCronjob.class.php
wcfsetup/install/files/lib/system/importer/ImportHandler.class.php
wcfsetup/install/files/lib/system/like/LikeHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/AbstractCommentResponseModerationQueueHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php
wcfsetup/install/files/lib/system/package/PackageArchive.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php
wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php
wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php
wcfsetup/install/files/lib/system/page/handler/TDecoratedCategoryLookupPageHandler.class.php
wcfsetup/install/files/lib/system/page/handler/TrophyPageHandler.class.php
wcfsetup/install/files/lib/system/poll/PollManager.class.php
wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php
wcfsetup/install/files/lib/system/search/ArticleSearch.class.php
wcfsetup/install/files/lib/system/search/PageSearch.class.php
wcfsetup/install/files/lib/system/search/mysql/MysqlSearchEngine.class.php
wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php
wcfsetup/install/files/lib/system/stat/AbstractCommentStatDailyHandler.class.php
wcfsetup/install/files/lib/system/tagging/TagEngine.class.php
wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php
wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php
wcfsetup/install/files/lib/system/user/notification/object/type/ArticleCommentUserNotificationObjectType.class.php
wcfsetup/install/files/lib/system/user/notification/object/type/TMultiRecipientModerationQueueCommentUserNotificationObjectType.class.php
wcfsetup/install/files/lib/system/worker/MailWorker.class.php
wcfsetup/install/files/lib/system/worker/UserActivityPointItemsRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php
wcfsetup/install/files/lib/util/MessageUtil.class.php

index 1a5a974c07c5b9f0cb8a00eadeda2ce50e7a2f15..58a0beedc50efee21e1d8c7fb0b3ee73ed3f98f8 100644 (file)
@@ -100,7 +100,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         WHERE       banned = ?";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
                 $statement->execute([1]);
@@ -114,7 +114,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         ORDER BY    user_table.registrationDate DESC";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
                 $statement->execute();
@@ -127,7 +127,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         WHERE       activationCode <> ?
                         ORDER BY    user_table.registrationDate DESC";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
@@ -147,7 +147,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         " . $conditionBuilder . "
                         ORDER BY    user_table.registrationDate DESC";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
@@ -159,7 +159,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         WHERE       disableAvatar = ?";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
                 $statement->execute([1]);
@@ -170,7 +170,7 @@ class UserQuickSearchAction extends AbstractAction
                 $sql = "SELECT      user_table.userID
                         FROM        wcf" . WCF_N . "_user user_table
                         LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                        ON          (option_value.userID = user_table.userID)
+                        ON          option_value.userID = user_table.userID
                         WHERE       disableSignature = ?";
                 $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
                 $statement->execute([1]);
index 25a9d08dc96556c85ac4f6768b5b1b2e6e11ade0..e04bb9017bcfd342ca838a50ca2ae3c726c3f979 100755 (executable)
@@ -270,7 +270,7 @@ class UserSearchForm extends UserOptionListForm
     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');
index 91c58797fe53dc9c74b1cf74e106130c381a7303..68f2edd2d24f9f351d1f968a8b9e909ac8631b28 100755 (executable)
@@ -93,7 +93,7 @@ class CronjobLogListPage extends SortablePage
         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]);
index 103840ae53265d3f2118a10c755ddf0c96e1a563..a50f0af19193c6d723114ee2c8f7a8dc35c648f8 100644 (file)
@@ -110,7 +110,7 @@ class LabelListPage extends SortablePage
         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]);
 
index f21a2873b0775f6acb0e02864b433f7ca61c70ac..8c330b2b221b058089b5b5a4670417baa90cf4ee 100644 (file)
@@ -127,8 +127,8 @@ class PaidSubscriptionTransactionLogListPage extends SortablePage
         }
 
         $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";
+        $this->objectList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription ON paid_subscription.subscriptionID = paid_subscription_transaction_log.subscriptionID";
     }
 
     /**
index 5a571666172acd8a3f3a400238eec070a0ae2946..8e3083ae96c534a331fc0937cb541007768ad54c 100644 (file)
@@ -99,8 +99,8 @@ class PaidSubscriptionUserListPage extends SortablePage
 
         $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";
+        $this->objectList->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_paid_subscription paid_subscription ON paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
     }
 
     /**
index cd83e43e86f0a59acc63d26baa159cdac4f032ad..d625a148c449d71bb8675608c898644e8f62000d 100755 (executable)
@@ -260,7 +260,7 @@ class UserListPage extends SortablePage
         // 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(
@@ -287,9 +287,9 @@ class UserListPage extends SortablePage
             $sql = "SELECT      user_avatar.*, option_value.*, user_table.*
                     FROM        wcf" . WCF_N . "_user user_table
                     LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                    ON          (option_value.userID = user_table.userID)
+                    ON          option_value.userID = user_table.userID
                     LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
-                    ON          (user_avatar.avatarID = user_table.avatarID)
+                    ON          user_avatar.avatarID = user_table.avatarID
                     " . $conditions . "
                     ORDER BY    " . (($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption' . $this->options[$this->sortField]->optionID : 'user_table.' . $this->sortField) . " " . $this->sortOrder;
             $statement = WCF::getDB()->prepareStatement($sql);
index 2efcff171272fc956fa7ba35d3cc8c26ed7d98f3..a6476722cccf4b70b3506025c5fe09a2065363fe 100644 (file)
@@ -55,6 +55,6 @@ class UserRankListPage extends SortablePage
         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';
     }
 }
index 07a9f8f599a8f4c06595b47cfcdd0b5f11018e11..4ae5d98aeb1c4bfac6d79298a54f35f61a309d95 100644 (file)
@@ -57,10 +57,8 @@ abstract class I18nDatabaseObjectList extends DatabaseObjectList
                 $this->sqlSelects .= (!empty($this->sqlSelects) ? ', ' : '') . "COALESCE(" . $matchTable . ".languageItemValue, " . $this->getDatabaseTableAlias() . "." . $key . ") AS " . $value;
                 $this->sqlJoins .= "
                     LEFT JOIN   wcf" . WCF_N . "_language_item " . $matchTable . "
-                    ON          (
-                                        " . $matchTable . ".languageItem = " . $this->getDatabaseTableAlias() . "." . $key . "
-                                    AND " . $matchTable . ".languageID = " . $languageID . "
-                                )";
+                    ON          " . $matchTable . ".languageItem = " . $this->getDatabaseTableAlias() . "." . $key . "
+                            AND " . $matchTable . ".languageID = " . $languageID;
             }
         }
     }
index 51ce65af82a6488b3c2295b7d3991e7c518a07ac..3555dfc415d1aadb11fe6e1ca1d3b1e7e0b3ed90 100644 (file)
@@ -42,7 +42,7 @@ class ACPSessionLog extends DatabaseObject
             $sql = "SELECT      acp_session_log.*, user_table.username, 0 AS active
                     FROM        wcf" . WCF_N . "_acp_session_log acp_session_log
                     LEFT JOIN   wcf" . WCF_N . "_user user_table
-                    ON          (user_table.userID = acp_session_log.userID)
+                    ON          user_table.userID = acp_session_log.userID
                     WHERE       acp_session_log.sessionLogID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute([$id]);
index c7807ccdd8efb8a5a137eb0b05001a3219a5f7d0..02a0d35f1b2d220551ddf6e8121e511dd1b4c5dc 100644 (file)
@@ -42,8 +42,8 @@ class ACPSessionLogList extends DatabaseObjectList
             ) AS accesses";
 
         $this->sqlJoins .= "
-            LEFT JOIN wcf" . WCF_N . "_user user_table
-            ON  (user_table.userID = " . $this->getDatabaseTableAlias() . ".userID)";
+            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            ON          user_table.userID = " . $this->getDatabaseTableAlias() . ".userID";
 
         parent::readObjects();
     }
index 545b71bcf9c2188830b0c3f52607787d00320214..9004c2d2c236ba1f7a0438c56adf36b65dd02671 100644 (file)
@@ -256,11 +256,9 @@ class ViewableArticle extends DatabaseObjectDecorator
                         $sql = "SELECT      COUNT(*)
                                 FROM        wcf" . WCF_N . "_article article
                                 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 . "
-                                            )
+                                ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
+                                        AND tracked_visit.objectID = article.articleID
+                                        AND tracked_visit.userID = " . WCF::getUser()->userID . "
                                 " . $conditionBuilder;
                         $statement = WCF::getDB()->prepareStatement($sql);
                         $statement->execute($conditionBuilder->getParameters());
@@ -384,11 +382,9 @@ class ViewableArticle extends DatabaseObjectDecorator
         $sql = "SELECT      COUNT(*)
                 FROM        wcf" . WCF_N . "_article article
                 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 . "
-                            )
+                ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
+                        AND tracked_visit.objectID = article.articleID
+                        AND tracked_visit.userID = " . WCF::getUser()->userID . "
                 " . $conditionBuilder;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditionBuilder->getParameters());
@@ -427,11 +423,9 @@ class ViewableArticle extends DatabaseObjectDecorator
                         $sql = "SELECT      COUNT(*)
                                 FROM        wcf" . WCF_N . "_article article
                                 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 . "
-                                            )
+                                ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
+                                        AND tracked_visit.objectID = article.articleID
+                                        AND tracked_visit.userID = " . WCF::getUser()->userID . "
                                 " . $conditionBuilder;
                         $statement = WCF::getDB()->prepareStatement($sql);
                         $statement->execute($conditionBuilder->getParameters());
index e0d6453cc37268f5362b7b8fdc24b8a002f38c54..58daaabc4595af00c6d8179f73855441cd2628fc 100644 (file)
@@ -49,14 +49,14 @@ class ViewableArticleList extends ArticleList
                 $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";
     }
 
     /**
index e072ac095290ac192b972a99f6e81b9883637035..345ddd95401253652c2e2f62ad2ba2d0fdddf24d 100644 (file)
@@ -33,7 +33,7 @@ class AdministrativeAttachmentList extends AttachmentList
         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";
     }
 
     /**
index d126e7b8d9f3666739b00d4c6a8ba2c575365825..ec434bdd1f0ae61d02dca9b5faf4b0874823539b 100644 (file)
@@ -77,7 +77,7 @@ class LikeableCommentResponseProvider extends AbstractObjectTypeProvider impleme
         $sql = "SELECT      comment.objectTypeID, comment_response.responseID
                 FROM        wcf" . WCF_N . "_comment_response comment_response
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (comment.commentID = comment_response.commentID)
+                ON          comment.commentID = comment_response.commentID
                 " . $conditionBuilder;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditionBuilder->getParameters());
index cfae0270a6476f350ac1fbb55febf5435155da0f..1fe037bb3ed768b50368b7c4c79df703c6d9737f 100644 (file)
@@ -114,10 +114,8 @@ class DevtoolsMissingLanguageItemAction extends AbstractDatabaseObjectAction imp
         $sql = "DELETE      devtools_missing_language_item
                 FROM        wcf" . WCF_N . "_devtools_missing_language_item devtools_missing_language_item
                 INNER JOIN  wcf" . WCF_N . "_language_item language_item
-                ON          (
-                                language_item.languageItem = devtools_missing_language_item.languageItem
-                                AND language_item.languageID = devtools_missing_language_item.languageID
-                            )";
+                ON          language_item.languageItem = devtools_missing_language_item.languageItem
+                        AND language_item.languageID = devtools_missing_language_item.languageID";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute();
     }
index 4709925abdb0ad78e1e73d4d82b93e6135a1cc87..e00236cfcd0367efc46cf353cedcf55f79c23428 100644 (file)
@@ -156,7 +156,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                             languageCategory
                 FROM        wcf" . WCF_N . "_language_item language_item
                 LEFT JOIN   wcf" . WCF_N . "_language_category language_category
-                ON          (language_category.languageCategoryID = language_item.languageCategoryID)
+                ON          language_category.languageCategoryID = language_item.languageCategoryID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index 14f821f1e6f148ec31adfae42ed1fd9335ac4f7b..e193ee7e80cf5a9f8b3307de564018e17e315381 100644 (file)
@@ -39,7 +39,7 @@ class MediaList extends DatabaseObjectList
 
         $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]);
index 2c969395e5e6749ddb42a3e0d0223f130ad9f477..aff03d87eea48e97dbf079b6f4c4216a340b694d 100644 (file)
@@ -40,6 +40,6 @@ class ViewableMediaList extends MediaList
 
         // 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 . ")";
     }
 }
index 7b61bee64cdba65309f71e9492e911ef0a603e46..2c463f5613eae94d2b4b2db93d976e5356d57c82 100644 (file)
@@ -130,13 +130,11 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction
         $sql = "SELECT      moderation_queue.queueID
                 FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
                 LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
-                ON          (moderation_queue.queueID = moderation_queue_to_user.queueID)
+                ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                 LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
-                ON          (
-                                    tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
-                                AND tracked_visit.objectID = moderation_queue.queueID
-                                AND tracked_visit.userID = " . WCF::getUser()->userID . "
-                            )
+                ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
+                        AND tracked_visit.objectID = moderation_queue.queueID
+                        AND tracked_visit.userID = " . WCF::getUser()->userID . "
                 " . $conditions . "
                 ORDER BY    moderation_queue.lastChangeTime DESC";
         $statement = WCF::getDB()->prepareStatement($sql, $MAX_ITEMS);
index 2d1a94fdde1604a8997f95dcb8f4d31f7dae09d9..03d85e0a39c8751fcf3d94209807bb917946e0c7 100644 (file)
@@ -45,8 +45,8 @@ class ViewableModerationQueueList extends ModerationQueueList
         $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";
+        $this->sqlJoins .= " 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]);
index ad814d5561380a60ad6f4dd5568100d8ad1dc67d..11a93576183f16048336c2cf88f5536439f8520d 100644 (file)
@@ -97,7 +97,7 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $sql = "SELECT      package_update.packageUpdateID
                 FROM        wcf" . WCF_N . "_package_update package_update
                 LEFT JOIN   wcf" . WCF_N . "_package package
-                ON          (package.package = package_update.package)
+                ON          package.package = package_update.package
                 " . $conditions . "
                 ORDER BY    package_update.packageName ASC";
         $statement = WCF::getDB()->prepareStatement($sql, 1000);
@@ -319,7 +319,7 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $sql = "SELECT      pu.package, puv.packageUpdateVersionID, puv.packageUpdateID, puv.packageVersion, puv.isAccessible
                 FROM        wcf" . WCF_N . "_package_update_version puv
                 LEFT JOIN   wcf" . WCF_N . "_package_update pu
-                ON          (pu.packageUpdateID = puv.packageUpdateID)
+                ON          pu.packageUpdateID = puv.packageUpdateID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index 41c6a549e1904f790dfa9b47d7422b447139572e..01b2353c5b9544357cdac455245d3a4180afddfd 100644 (file)
@@ -162,7 +162,8 @@ class Style extends DatabaseObject
         $sql = "SELECT      variable.variableName, variable.defaultValue, value.variableValue
                 FROM        wcf" . WCF_N . "_style_variable variable
                 LEFT JOIN   wcf" . WCF_N . "_style_variable_value value
-                ON          (value.variableID = variable.variableID AND value.styleID = ?)
+                ON          value.variableID = variable.variableID
+                        AND value.styleID = ?
                 ORDER BY    variable.variableID ASC";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->styleID]);
index 42a52d982d7f5627c3356fa094ea590927ccfbe4..2b7b84c0fb355cd10a6ddf73af8ed31d5845fd88 100644 (file)
@@ -155,10 +155,8 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
         $sql = "SELECT      variable.variableName
                 FROM        wcf" . WCF_N . "_style_variable variable
                 LEFT JOIN   wcf" . WCF_N . "_style_variable_value variable_value
-                ON          (
-                                    variable_value.variableID = variable.variableID
-                                AND variable_value.styleID = ?
-                            )
+                ON          variable_value.variableID = variable.variableID
+                        AND variable_value.styleID = ?
                 WHERE       variable.variableName LIKE ?
                         AND variable_value.variableValue IS NULL";
         $statement = WCF::getDB()->prepareStatement($sql);
@@ -861,7 +859,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
         $sql = "SELECT      language.languageCode, language_item.languageItemValue
                 FROM        wcf" . WCF_N . "_language_item language_item
                 LEFT JOIN   wcf" . WCF_N . "_language language
-                ON          (language.languageID = language_item.languageID)
+                ON          language.languageID = language_item.languageID
                 WHERE       language_item.languageItem = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->styleDescription]);
@@ -938,7 +936,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
         $sql = "SELECT      variable.variableName, value.variableValue
                 FROM        wcf" . WCF_N . "_style_variable_value value
                 LEFT JOIN   wcf" . WCF_N . "_style_variable variable
-                ON          (variable.variableID = value.variableID)
+                ON          variable.variableID = value.variableID
                 WHERE       value.styleID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->styleID]);
@@ -962,7 +960,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $sql = "SELECT      template.*, package.package
                     FROM        wcf" . WCF_N . "_template template
                     LEFT JOIN   wcf" . WCF_N . "_package package
-                    ON          (package.packageID = template.packageID)
+                    ON          package.packageID = template.packageID
                     WHERE       template.templateGroupID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute([$this->templateGroupID]);
index 0f045cbae8225b8cc3a1d35767fe1d1a677ca8a6..eeb269eb150025973642bf5dba74971b89fe0914 100644 (file)
@@ -43,9 +43,9 @@ class Template extends DatabaseObject
                                 package.package
                     FROM        wcf" . WCF_N . "_template template
                     LEFT JOIN   wcf" . WCF_N . "_template_group template_group
-                    ON          (template_group.templateGroupID = template.templateGroupID)
+                    ON          template_group.templateGroupID = template.templateGroupID
                     LEFT JOIN   wcf" . WCF_N . "_package package
-                    ON          (package.packageID = template.packageID)
+                    ON          package.packageID = template.packageID
                     WHERE       template.templateID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute([$id]);
index 5fa4e4155f64b5682c2804567661829a36f39364..ddbc9844435a5e3999e401297d1f459515c86b7e 100644 (file)
@@ -34,8 +34,8 @@ class TemplateList extends DatabaseObjectList
         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";
+        $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_template_group template_group ON template_group.templateGroupID = template.templateGroupID";
     }
 
     /**
index 0aed5f70ff858681c5f01b9408f7ff9b6af03755..824ee5517fd05c1d1f212a6456e94b8f3f3cd3b1 100644 (file)
@@ -48,7 +48,7 @@ class TeamList extends UserProfileList
                 FROM        wcf" . WCF_N . "_user_group user_group,
                             wcf" . WCF_N . "_user_to_group user_to_group
                 LEFT JOIN   wcf" . WCF_N . "_user user_table
-                ON          (user_table.userID = user_to_group.userID)
+                ON          user_table.userID = user_to_group.userID
                 WHERE       user_to_group.groupID = user_group.groupID
                         AND user_group.showOnTeamPage = 1
                 ORDER BY    user_group.priority DESC" . (!empty($this->sqlOrderBy) ? ", " . $this->sqlOrderBy : '');
@@ -68,7 +68,7 @@ class TeamList extends UserProfileList
                 FROM        wcf" . WCF_N . "_user_group user_group,
                             wcf" . WCF_N . "_user_to_group user_to_group
                 LEFT JOIN   wcf" . WCF_N . "_user user_table
-                ON          (user_table.userID = user_to_group.userID)
+                ON          user_table.userID = user_to_group.userID
                 WHERE       user_to_group.groupID = user_group.groupID
                         AND user_group.showOnTeamPage = 1
                 ORDER BY    user_group.priority DESC" . (!empty($this->sqlOrderBy) ? ", " . $this->sqlOrderBy : '');
index 157c630155e9af559aab7abd1dc33d7c72d5b920..5e4018fc52d1bc852846b7c28449124cd8400bf6 100644 (file)
@@ -129,7 +129,7 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
             $sql = "SELECT      user_option_value.*, user_table.*
                     FROM        wcf" . WCF_N . "_user user_table
                     LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                    ON          (user_option_value.userID = user_table.userID)
+                    ON          user_option_value.userID = user_table.userID
                     WHERE       user_table.userID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute([$id]);
@@ -354,7 +354,7 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
         $sql = "SELECT      user_option_value.*, user_table.*
                 FROM        wcf" . WCF_N . "_user user_table
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                ON          (user_option_value.userID = user_table.userID)
+                ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.username = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$username]);
@@ -377,7 +377,7 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
         $sql = "SELECT      user_option_value.*, user_table.*
                 FROM        wcf" . WCF_N . "_user user_table
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                ON          (user_option_value.userID = user_table.userID)
+                ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.email = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$email]);
@@ -400,7 +400,7 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
         $sql = "SELECT      user_option_value.*, user_table.*
                 FROM        wcf" . WCF_N . "_user user_table
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                ON          (user_option_value.userID = user_table.userID)
+                ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.authData = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$authData]);
index e439069fffcc553b6bed558ef2abacb09a290985..89fd1f42082cb7bcced4c896aef9570df7c8f215 100644 (file)
@@ -831,7 +831,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         $sql = "SELECT      user_option_value.*, user_table.*
                 FROM        wcf" . WCF_N . "_user user_table
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                ON          (user_option_value.userID = user_table.userID)
+                ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.userID IN (" . \str_repeat('?,', \count($this->objectIDs) - 1) . "?)";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($this->objectIDs);
index 0ac3c6e90be5d86d033a0c1eb1f8a5e297dbefde..c4592a2286209d53819c2263970f90a70dc6054c 100644 (file)
@@ -35,6 +35,6 @@ class UserList extends DatabaseObjectList
             $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";
     }
 }
index 4579373c46bb3072c539a08a31d17c4c27b9ef46..92f06e212422ed83ce3d9db6a6858a1b7408c5c1 100644 (file)
@@ -395,7 +395,7 @@ class UserProfileAction extends UserAction implements IPopoverAction
             $sql = "SELECT      user_rank.rankID
                     FROM        wcf" . WCF_N . "_user_rank user_rank
                     LEFT JOIN   wcf" . WCF_N . "_user_group user_group
-                    ON          (user_group.groupID = user_rank.groupID)
+                    ON          user_group.groupID = user_rank.groupID
                     " . $conditionBuilder . "
                     ORDER BY    user_group.priority DESC, user_rank.requiredPoints DESC, user_rank.requiredGender DESC";
             $statement = WCF::getDB()->prepareStatement($sql, 1);
index 3c7d54f8555f923a7ae3cff79329596ab3b85b0d..142b9af914be8ce908a0e6af7f375518ce4be832 100644 (file)
@@ -38,16 +38,16 @@ class UserProfileList extends UserList
             $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";
     }
 
     /**
index c2ee85d8be46522cccc5e1e7f4b500ffa65e745c..cee6bf39eadb231b7e7dc866857bb21cf9dfb2e0 100644 (file)
@@ -50,7 +50,7 @@ class UserFollowerList extends UserFollowList
         $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";
+        $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
     }
 }
index 25ad4f1a024b8655ede697f3b8e4570a032d9a2c..fcd10a67e9af9a56ee533ba1a10a66e2372ae60b 100644 (file)
@@ -28,13 +28,13 @@ class UserFollowingList extends UserFollowerList
 
         $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";
+        $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";
 
         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.*";
index d130003eeb44e76f81d3e38a5b7440639cd885c9..d0045c269381371f7898742cebb6910b50040c37 100644 (file)
@@ -504,7 +504,7 @@ class UserGroup extends DatabaseObject implements ITitledObject
                 $sql = "SELECT      group_option.optionName, option_value.optionValue
                         FROM        wcf" . WCF_N . "_user_group_option_value option_value
                         LEFT JOIN   wcf" . WCF_N . "_user_group_option group_option
-                        ON          (group_option.optionID = option_value.optionID)
+                        ON          group_option.optionID = option_value.optionID
                         " . $conditions;
                 $statement = WCF::getDB()->prepareStatement($sql);
                 $statement->execute($conditions->getParameters());
index 6392da7ba3ad46e6a3f846933db251e164eec5e9..c69608aae793c0f107f2167e12969faa36c6b6f9 100644 (file)
@@ -49,13 +49,13 @@ class ViewableUserIgnoreList extends UserIgnoreList
         $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";
+        $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";
 
         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.*";
index c151fc8c36b5fc92431869dfb7d35392355b49ea..0dc913aa719da2e0d80f25aee131aa789c7a9e42 100644 (file)
@@ -19,7 +19,7 @@ class UserNotificationEventRecipientList extends UserList
      */
     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();
index 8008ff193c1fd29217479e3dbd1c834fa32f1ccb..f825830d41f83ce5c6df7c7622e7dab0f62b33d5 100644 (file)
@@ -57,11 +57,11 @@ class UsersOnlineList extends SessionList
 
         $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";
+        $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->getConditionBuilder()->add('session.lastActivityTime > ?', [TIME_NOW - USER_ONLINE_TIMEOUT]);
     }
@@ -98,7 +98,7 @@ class UsersOnlineList extends SessionList
         $sql = "SELECT      user_option_value.userOption" . User::getUserOptionID('canViewOnlineStatus') . " AS canViewOnlineStatus, session.userID
                 FROM        wcf" . WCF_N . "_session session
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
-                ON          (user_option_value.userID = session.userID)
+                ON          user_option_value.userID = session.userID
                 " . $conditionBuilder;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditionBuilder->getParameters());
index 3643a7f2ed6b8ed7b04f7f5bd8b28955e6fe6d96..603ff3779d703e04a062814c77d71b08b8ec45f0 100644 (file)
@@ -46,7 +46,7 @@ class UserProfileVisitorList extends DatabaseObjectList
         $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";
+        $this->sqlJoins .= " LEFT JOIN wcf" . WCF_N . "_user_avatar user_avatar ON user_avatar.avatarID = user_table.avatarID";
     }
 }
index 23ed2ecd622bd42d877515f6b9b67f807e73c9db..b95c8a6f2c81acd35daa37e917169a2b39892e59 100644 (file)
@@ -174,7 +174,7 @@ class UserSearchForm extends UserOptionListForm
         $sql = "SELECT      user_table.userID
                 FROM        wcf" . WCF_N . "_user user_table
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
-                ON          (option_value.userID = user_table.userID)";
+                ON          option_value.userID = user_table.userID";
 
         // build search condition
         $this->conditions = new PreparedStatementConditionBuilder();
index a14fd3bb55f83ed433eb870e9712e0d671d11275..9bab3f74e8c99e98d9b9ae4f9c617d9f7100011e 100644 (file)
@@ -97,12 +97,10 @@ class CategoryArticleListPage extends ArticleListPage
         if ($this->category->sortField === 'title') {
             $this->objectList->sqlJoins .= '
                 LEFT JOIN   wcf' . WCF_N . '_article_content article_content
-                ON          (
-                                    article_content.articleID = article.articleID
-                                AND (
-                                        article_content.languageID IS NULL
-                                     OR article_content.languageID = ' . WCF::getLanguage()->languageID . '
-                                )
+                ON          article_content.articleID = article.articleID
+                        AND (
+                                article_content.languageID IS NULL
+                             OR article_content.languageID = ' . WCF::getLanguage()->languageID . '
                             )';
         }
 
index d0a9b19544e4d9820c5c2d07206b5bedfb785a5d..bf9acf27f169775a89f70966305e7785224ec148 100644 (file)
@@ -59,7 +59,7 @@ class UnreadArticleListPage extends ArticleListPage
         );
 
         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)");
         }
     }
index 353bd3f3283fe93bb55be411677fcf0ab51f70ec..e9d05ca01bf6e9e01dfc013ce912b541a0716a4f 100644 (file)
@@ -79,9 +79,9 @@ class NotificationEmailDeliveryBackgroundJob extends AbstractBackgroundJob
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
                 FROM        wcf" . WCF_N . "_user_notification notification
                 LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
-                ON          (notification_event.eventID = notification.eventID)
+                ON          notification_event.eventID = notification.eventID
                 LEFT JOIN   wcf" . WCF_N . "_object_type object_type
-                ON          (object_type.objectTypeID = notification_event.objectTypeID)
+                ON          object_type.objectTypeID = notification_event.objectTypeID
                 WHERE       notification.notificationID = ?
                 ORDER BY    notification.time DESC";
         $statement = WCF::getDB()->prepareStatement($sql, 1);
index 323be270f99684dadb817751b9ac680b74f7a4ff..202433d3e3ce5da15864cf786a7b25c80eedeb43 100644 (file)
@@ -30,8 +30,8 @@ class ArticleCommentListBoxController extends AbstractCommentListBoxController
     {
         $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';
+            $commentList->sqlJoins .= ' 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]);
index abc79e77b71a3849984f52d5daccd9437d1c93bc..0d86022da4083cf1a9c1167b2f60a4a73ff2a7da 100644 (file)
@@ -84,7 +84,7 @@ class BoxHandler extends SingletonFactory
         $sql = "SELECT      objectTypeID
                 FROM        wcf" . WCF_N . "_object_type object_type
                 INNER JOIN  wcf" . WCF_N . "_object_type_definition object_type_definition
-                ON          (object_type.definitionID = object_type_definition.definitionID)
+                ON          object_type.definitionID = object_type_definition.definitionID
                 WHERE       objectType = ?
                         AND definitionName = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
index a9df6aeddd19a8d8c533a17a4865abace9677c49..e0d37466fedfeacf58e4f789757448f746743731 100644 (file)
@@ -33,7 +33,7 @@ class ProfileCommentListBoxController extends AbstractCommentListBoxController
 
         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();
index c91f054baffa6fb3797086765677a6bdb89de0ee..d71c982068512888fc2fb9c1f3752c3ddf57ce39 100644 (file)
@@ -28,7 +28,7 @@ class BBCodeCacheBuilder extends AbstractCacheBuilder
         $sql = "SELECT      attribute.*, bbcode.bbcodeTag
                 FROM        wcf" . WCF_N . "_bbcode_attribute attribute
                 LEFT JOIN   wcf" . WCF_N . "_bbcode bbcode
-                ON          (bbcode.bbcodeID = attribute.bbcodeID)
+                ON          bbcode.bbcodeID = attribute.bbcodeID
                 ORDER BY    attribute.attributeNo";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute();
index 90eeeb249d156ef442e1ed4471ee87df00aa5a0f..b1997855fd79df550f3e43bfc37c49a57e26cb50 100644 (file)
@@ -21,7 +21,7 @@ class CategoryCacheBuilder extends AbstractCacheBuilder
     {
         $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();
 
index d60459245c578e147bb1bef7b6112c47ff873e54..3a6a4deeb9aa4bc6740e506c9b2c7102736764b6 100644 (file)
@@ -252,7 +252,7 @@ class RoutingCacheBuilder extends AbstractCacheBuilder
         $sql = "SELECT      page_content.customURL AS controllerCustomURL, page_content.pageID, page_content.languageID, page.applicationPackageID
                 FROM        wcf" . WCF_N . "_page_content page_content
                 LEFT JOIN   wcf" . WCF_N . "_page page
-                ON          (page.pageID = page_content.pageID)";
+                ON          page.pageID = page_content.pageID";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
index a55780876a7ac96d244e774226eabfaf1bf69081..02db02e7b02c013d01dd736bb4252e3d388a21eb 100644 (file)
@@ -61,7 +61,7 @@ class UserGroupPermissionCacheBuilder extends AbstractCacheBuilder
         $sql = "SELECT      option_table.optionName, option_table.optionType, option_value.optionValue, option_value.groupID, option_table.enableOptions
                 FROM        wcf" . WCF_N . "_user_group_option_value option_value
                 LEFT JOIN   wcf" . WCF_N . "_user_group_option option_table
-                ON          (option_table.optionID = option_value.optionID)
+                ON          option_table.optionID = option_value.optionID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index d80ef5c891c2eeaa61fdfc25c489759ca9496fbf..af4322a9d8bfa3fae367ae319fcfee0aa6e10554 100644 (file)
@@ -26,7 +26,7 @@ class UserNotificationEventCacheBuilder extends AbstractCacheBuilder
         $sql = "SELECT      event.*, object_type.objectType
                 FROM        wcf" . WCF_N . "_user_notification_event event
                 LEFT JOIN   wcf" . WCF_N . "_object_type object_type
-                ON          (object_type.objectTypeID = event.objectTypeID)";
+                ON          object_type.objectTypeID = event.objectTypeID";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
index aeba23a330c8284cc920aeaa53d34216d84fe7a5..100d88a3343de1db0d15f03a22e4f79c6b9b346b 100644 (file)
@@ -269,10 +269,8 @@ class CommentHandler extends SingletonFactory
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (
-                                    comment.commentID = user_notification.objectID
-                                AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType)) . "
-                            )";
+                ON          comment.commentID = user_notification.objectID
+                        AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType));
             $notificationList->getConditionBuilder()->add('comment.objectID IN (?)', [$objectIDs]);
             $notificationList->getConditionBuilder()->add('comment.time <= ?', [$time]);
             $notificationList->readObjects();
@@ -320,10 +318,8 @@ class CommentHandler extends SingletonFactory
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (
-                                    comment.commentID = user_notification.baseObjectID
-                                AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType)) . "
-                            )";
+                ON          comment.commentID = user_notification.baseObjectID
+                        AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType));
             $notificationList->getConditionBuilder()->add('comment.objectID IN (?)', [$objectIDs]);
             $notificationList->getConditionBuilder()->add('comment.time <= ?', [$time]);
             $notificationList->readObjects();
@@ -371,9 +367,9 @@ class CommentHandler extends SingletonFactory
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
                 LEFT JOIN   wcf" . WCF_N . "_comment_response comment_response
-                ON          (comment_response.responseID = user_notification.objectID)
+                ON          comment_response.responseID = user_notification.objectID
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (comment.commentID = comment_response.commentID)";
+                ON          comment.commentID = comment_response.commentID";
             $notificationList->getConditionBuilder()->add(
                 'comment.objectTypeID IN (?)',
                 [$this->getObjectTypeID($objectType)]
@@ -425,9 +421,9 @@ class CommentHandler extends SingletonFactory
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
                 LEFT JOIN   wcf" . WCF_N . "_comment_response comment_response
-                ON          (comment_response.responseID = user_notification.baseObjectID)
+                ON          comment_response.responseID = user_notification.baseObjectID
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (comment.commentID = comment_response.commentID)";
+                ON          comment.commentID = comment_response.commentID";
             $notificationList->getConditionBuilder()->add(
                 'comment.objectTypeID IN (?)',
                 [$this->getObjectTypeID($objectType)]
index d43ed736d98f30964b5701da21c62c9c0bdfcb23..07348026c34a9d703972d7ecde11f8799fa81a88 100644 (file)
@@ -71,9 +71,9 @@ class DailyMailNotificationCronjob extends AbstractCronjob
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
                 FROM        wcf" . WCF_N . "_user_notification notification
                 LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
-                ON          (notification_event.eventID = notification.eventID)
+                ON          notification_event.eventID = notification.eventID
                 LEFT JOIN   wcf" . WCF_N . "_object_type object_type
-                ON          (object_type.objectTypeID = notification_event.objectTypeID)
+                ON          object_type.objectTypeID = notification_event.objectTypeID
                 " . $conditions . "
                 ORDER BY    notification.time";
         $statement = WCF::getDB()->prepareStatement($sql);
index 2a21bd441f9b39afad26427a05d14d69b8203807..2762604686ab086724f3424797009e402b5f232d 100644 (file)
@@ -48,7 +48,7 @@ class ExpiringPaidSubscriptionUserCronjob extends AbstractCronjob
         );
 
         $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 . ')',
index 53a0f2a45644dcfbfe01539fa00a8df5f93e0435..1ca992806d5b71f8b4c191258a701205319bc0e0 100644 (file)
@@ -112,7 +112,7 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction
 
             $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 = ?
index 6128ef44dc771adf035372c15ef3e7ce2b7e4817..d66b689eced1839c80f55e5497f82f0895207638 100644 (file)
@@ -181,11 +181,9 @@ class LikeHandler extends SingletonFactory
                             CASE WHEN like_table.likeValue IS NOT NULL THEN like_table.likeValue ELSE 0 END AS liked
                 FROM        wcf" . WCF_N . "_like_object like_object
                 LEFT JOIN   wcf" . WCF_N . "_like like_table
-                ON          (
-                                    like_table.objectTypeID = ?
-                                AND like_table.objectID = like_object.objectID
-                                AND like_table.userID = ?
-                            )
+                ON          like_table.objectTypeID = ?
+                        AND like_table.objectID = like_object.objectID
+                        AND like_table.userID = ?
                 WHERE       like_object.likeObjectID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([
index f24ee7101ad686537b830e10bda24b3e20c12c39..b663049e87100e0eab9a86f4104cdc94c35d4764 100644 (file)
@@ -52,7 +52,7 @@ class AbstractCommentResponseModerationQueueHandler extends AbstractCommentComme
         $sql = "SELECT      comment_response.responseID, comment.commentID, comment.objectTypeID, comment.objectID
                 FROM        wcf" . WCF_N . "_comment_response comment_response
                 LEFT JOIN   wcf" . WCF_N . "_comment comment
-                ON          (comment.commentID = comment_response.commentID)
+                ON          comment.commentID = comment_response.commentID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index 2270ec00647eec18e3671a36c493840557c7e6df..d8aadddb2555b1179a98ab49205e797e36774772 100644 (file)
@@ -238,7 +238,7 @@ class ModerationQueueManager extends SingletonFactory
             $sql = "SELECT      COUNT(*)
                     FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
                     LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
-                    ON          (moderation_queue.queueID = moderation_queue_to_user.queueID)
+                    ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                     " . $conditions;
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute($conditions->getParameters());
@@ -284,13 +284,11 @@ class ModerationQueueManager extends SingletonFactory
             $sql = "SELECT      COUNT(*)
                     FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
                     LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
-                    ON          (moderation_queue.queueID = moderation_queue_to_user.queueID)
+                    ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                     LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
-                    ON          (
-                                        tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
-                                    AND tracked_visit.objectID = moderation_queue.queueID
-                                    AND tracked_visit.userID = " . WCF::getUser()->userID . "
-                                )
+                    ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
+                            AND tracked_visit.objectID = moderation_queue.queueID
+                            AND tracked_visit.userID = " . WCF::getUser()->userID . "
                     " . $conditions;
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute($conditions->getParameters());
@@ -309,7 +307,7 @@ class ModerationQueueManager extends SingletonFactory
     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();
 
@@ -367,7 +365,7 @@ class ModerationQueueManager extends SingletonFactory
         $sql = "SELECT      moderation_queue.queueID, moderation_queue.objectTypeID, moderation_queue.objectID
                 FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
                 LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
-                ON          (moderation_queue.queueID = moderation_queue_to_user.queueID)
+                ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                 WHERE       moderation_queue_to_user.userID = ?
                         AND moderation_queue_to_user.isAffected = ?
                         AND moderation_queue.status <> ?";
index 991d25e3285c0b18aefb53f55890d5e61a53ab8f..234a33db1fa325b86bfba778cc6c186e27abba66 100644 (file)
@@ -710,7 +710,7 @@ class PackageArchive
             $sql = "SELECT      package.*
                     FROM        wcf" . WCF_N . "_package_requirement requirement
                     LEFT JOIN   wcf" . WCF_N . "_package package
-                    ON          (package.packageID = requirement.requirement)
+                    ON          package.packageID = requirement.requirement
                     WHERE       requirement.packageID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute([$this->package->packageID]);
@@ -921,7 +921,7 @@ class PackageArchive
         $sql = "SELECT      package.*, package_exclusion.*
                 FROM        wcf" . WCF_N . "_package_exclusion package_exclusion
                 LEFT JOIN   wcf" . WCF_N . "_package package
-                ON          (package.packageID = package_exclusion.packageID)
+                ON          package.packageID = package_exclusion.packageID
                 WHERE       excludedPackage = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->packageInfo['name']]);
index 04f0cbcb4d3d4a56388d4de290d387819ac5ec67..b4fd2af82d221f716097afc832f16aa78407dd48 100644 (file)
@@ -393,11 +393,11 @@ class PackageInstallationScheduler
                                 package_update.package
                     FROM        wcf" . WCF_N . "_package_update_exclusion package_update_exclusion
                     LEFT JOIN   wcf" . WCF_N . "_package_update_version package_update_version
-                    ON          (package_update_version.packageUpdateVersionID = package_update_exclusion.packageUpdateVersionID)
+                    ON          package_update_version.packageUpdateVersionID = package_update_exclusion.packageUpdateVersionID
                     LEFT JOIN   wcf" . WCF_N . "_package_update package_update
-                    ON          (package_update.packageUpdateID = package_update_version.packageUpdateID)
+                    ON          package_update.packageUpdateID = package_update_version.packageUpdateID
                     LEFT JOIN   wcf" . WCF_N . "_package package
-                    ON          (package.package = package_update_exclusion.excludedPackage)
+                    ON          package.package = package_update_exclusion.excludedPackage
                     WHERE       package_update_exclusion.packageUpdateVersionID IN (
                                     SELECT  packageUpdateVersionID
                                     FROM    wcf" . WCF_N . "_package_update_version
@@ -445,7 +445,7 @@ class PackageInstallationScheduler
             $sql = "SELECT      package.*, package_exclusion.*
                     FROM        wcf" . WCF_N . "_package_exclusion package_exclusion
                     LEFT JOIN   wcf" . WCF_N . "_package package
-                    ON          (package.packageID = package_exclusion.packageID)
+                    ON          package.packageID = package_exclusion.packageID
                     " . $conditions;
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute($conditions->getParameters());
@@ -569,7 +569,7 @@ class PackageInstallationScheduler
         $sql = "SELECT      puv.packageVersion, puf.fromversion
                 FROM        wcf" . WCF_N . "_package_update_fromversion puf
                 LEFT JOIN   wcf" . WCF_N . "_package_update_version puv
-                ON          (puv.packageUpdateVersionID = puf.packageUpdateVersionID)
+                ON          puv.packageUpdateVersionID = puf.packageUpdateVersionID
                 WHERE       puf.packageUpdateVersionID IN (
                                 SELECT  packageUpdateVersionID
                                 FROM    wcf" . WCF_N . "_package_update_version
index 1a6e49bf136bbbb7657126481cf02f91f1dc576a..349b797cebf9825f3be938b7e1bbdeaffda83394 100644 (file)
@@ -785,7 +785,8 @@ class PackageUpdateDispatcher extends SingletonFactory
                             puv.packageUpdateVersionID, puv.packageDate, puv.filename, puv.packageVersion
                 FROM        wcf" . WCF_N . "_package_update pu
                 LEFT JOIN   wcf" . WCF_N . "_package_update_version puv
-                ON          (puv.packageUpdateID = pu.packageUpdateID AND puv.isAccessible = 1)
+                ON          puv.packageUpdateID = pu.packageUpdateID
+                        AND puv.isAccessible = 1
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
@@ -889,7 +890,7 @@ class PackageUpdateDispatcher extends SingletonFactory
         $sql = "SELECT      pur.package, pur.minversion, p.packageID
                 FROM        wcf" . WCF_N . "_package_update_requirement pur
                 LEFT JOIN   wcf" . WCF_N . "_package p
-                ON          (p.package = pur.package)
+                ON          p.package = pur.package
                 WHERE       pur.packageUpdateVersionID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$packageUpdateVersionID]);
@@ -955,9 +956,9 @@ class PackageUpdateDispatcher extends SingletonFactory
         $sql = "SELECT      puv.*, pu.*, pus.serverURL, pus.loginUsername, pus.loginPassword
                 FROM        wcf" . WCF_N . "_package_update_version puv
                 LEFT JOIN   wcf" . WCF_N . "_package_update pu
-                ON          (pu.packageUpdateID = puv.packageUpdateID)
+                ON          pu.packageUpdateID = puv.packageUpdateID
                 LEFT JOIN   wcf" . WCF_N . "_package_update_server pus
-                ON          (pus.packageUpdateServerID = pu.packageUpdateServerID)
+                ON          pus.packageUpdateServerID = pu.packageUpdateServerID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index b9cc39c9c6b4d150e9e5c89d0903bdf89dcb419f..10f0718481b82a3a162bc180f3d8839b462e8037 100644 (file)
@@ -214,7 +214,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                 $sql = "SELECT      objectTypeID
                         FROM        wcf" . WCF_N . "_object_type object_type
                         LEFT JOIN   wcf" . WCF_N . "_object_type_definition object_type_definition
-                        ON          (object_type_definition.definitionID = object_type.definitionID)
+                        ON          object_type_definition.definitionID = object_type.definitionID
                         WHERE       objectType = ?
                                 AND definitionName = ?";
                 $statement = WCF::getDB()->prepareStatement($sql);
index 4b2842885b0b7c9617fcee1dc63f7b987b9b568a..ad4c32c8e211dc51d491367c4fa7f35e0772ed0f 100644 (file)
@@ -257,7 +257,7 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl
                             language_category.languageCategory
                 FROM        wcf" . WCF_N . "_language_category language_category
                 LEFT JOIN   wcf" . WCF_N . "_language_item item
-                ON          (item.languageCategoryID = language_category.languageCategoryID)
+                ON          item.languageCategoryID = language_category.languageCategoryID
                 " . $conditions . "
                 GROUP BY    language_category.languageCategoryID ASC,
                             language_category.languageCategory ASC";
index acf7f39956e830bc13c76af00eb679f26a35b4de..85bb5d239e180108e452db20371fad7f58f77d4c 100644 (file)
@@ -65,7 +65,7 @@ class TemplatePackageInstallationPlugin extends AbstractPackageInstallationPlugi
                             template_group.templateGroupFolderName
                 FROM        wcf" . WCF_N . "_template template
                 LEFT JOIN   wcf" . WCF_N . "_template_group template_group
-                ON          (template_group.templateGroupID = template.templateGroupID)
+                ON          template_group.templateGroupID = template.templateGroupID
                 WHERE       packageID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->installation->getPackageID()]);
index b66d2fc494dbfdfe94906368e4e8f0528af040c7..39ba7e52100f2eddc5e34b45ab08912e6841dc1e 100644 (file)
@@ -316,7 +316,7 @@ class PackageValidationArchive implements \RecursiveIterator
         $sql = "SELECT      package.*, package_exclusion.*
                 FROM        wcf" . WCF_N . "_package_exclusion package_exclusion
                 LEFT JOIN   wcf" . WCF_N . "_package package
-                ON          (package.packageID = package_exclusion.packageID)
+                ON          package.packageID = package_exclusion.packageID
                 WHERE       excludedPackage = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$this->getArchive()->getPackageInfo('name')]);
index abac85b13b8eb24f62259b8ee8ac80bcd084807c..4ae33e8d267793adf78590f4cb98314819046427 100644 (file)
@@ -114,7 +114,7 @@ trait TDecoratedCategoryLookupPageHandler
         $sql = "SELECT      DISTINCT categoryID
                 FROM        wcf" . WCF_N . "_category category
                 LEFT JOIN   wcf" . WCF_N . "_language_item language_item
-                ON          (language_item.languageItem = category.title)
+                ON          language_item.languageItem = category.title
                 " . $conditionBuilder;
         $statement = WCF::getDB()->prepareStatement($sql, 10);
         $statement->execute($conditionBuilder->getParameters());
index fa9b20b4cfb44eae622ada76135e550ec6e9c46c..eac75184759501c1799c8fa604f3d85d06b4c68f 100644 (file)
@@ -50,7 +50,7 @@ class TrophyPageHandler extends AbstractLookupPageHandler
         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 . '%']
index 18b706c247d897c92de502ad7e25745206460951..6efe7b8f0e2056961390e373cebe62cd3dd3c296 100644 (file)
@@ -431,7 +431,7 @@ class PollManager extends SingletonFactory
         // 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";
         }
index 00761177c19bbed6473c3b8ffb7788a44d0ece13..18959729d4941d3dd95feefb71f3188f14c59a62 100644 (file)
@@ -280,11 +280,9 @@ class ReactionHandler extends SingletonFactory
                                 COALESCE(like_table.likeValue, 0) AS liked
                     FROM        wcf" . WCF_N . "_like_object like_object
                     LEFT JOIN   wcf" . WCF_N . "_like like_table
-                    ON          (
-                                        like_table.objectTypeID = like_object.objectTypeID
-                                    AND like_table.objectID = like_object.objectID
-                                    AND like_table.userID = ?
-                                )
+                    ON          like_table.objectTypeID = like_object.objectTypeID
+                            AND like_table.objectID = like_object.objectID
+                            AND like_table.userID = ?
                     " . $conditions;
 
             \array_unshift($parameters, WCF::getUser()->userID);
@@ -769,11 +767,9 @@ class ReactionHandler extends SingletonFactory
                             COALESCE(like_table.likeValue, 0) AS liked
                 FROM        wcf" . WCF_N . "_like_object like_object
                 LEFT JOIN   wcf" . WCF_N . "_like like_table
-                ON          (
-                                    like_table.objectTypeID = ?
-                                AND like_table.objectID = like_object.objectID
-                                AND like_table.userID = ?
-                            )
+                ON          like_table.objectTypeID = ?
+                        AND like_table.objectID = like_object.objectID
+                        AND like_table.userID = ?
                 WHERE   like_object.likeObjectID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([
index 38740d1c2cec32a900a9658f300ec3a0aa19b15f..969317ce29b326c000f1271d92c74bd17fba75cd 100644 (file)
@@ -134,7 +134,7 @@ class ArticleSearch extends AbstractSearchableObjectType
      */
     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';
     }
 
     /**
index f495ad964e5146f932747d6d3021d7ed05f6e256..bb7d8f2902e35b13a7aed8bde06bfe00b7f2e561 100644 (file)
@@ -142,7 +142,7 @@ class PageSearch extends AbstractSearchableObjectType
      */
     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';
     }
 
     /**
index 0d26d601dd3d89266fffc88dd3f5e09cf9269656..2d66c00ec01df209642f687139763350ba692cd9 100644 (file)
@@ -66,7 +66,7 @@ class MysqlSearchEngine extends AbstractSearchEngine
                                 " . ($orderBy == 'relevance ASC' || $orderBy == 'relevance DESC' ? ',search_index.relevance' : '') . "
                     FROM        " . $objectType->getTableName() . "
                     INNER JOIN  ({WCF_SEARCH_INNER_JOIN}) search_index
-                    ON          (" . $objectType->getIDFieldName() . " = search_index.objectID)
+                    ON          " . $objectType->getIDFieldName() . " = search_index.objectID
                     " . $objectType->getJoins() . "
                     " . ($additionalConditions[$objectTypeName] ?? '');
             }
index 7a553a04fe560d9e4962e04f01d2c784934c5413..faae58838c61b8202ee7b8a14411110428df8e69 100644 (file)
@@ -38,8 +38,8 @@ class MultilingualPageSitemapObject extends AbstractSitemapObjectObjectType
         /** @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]);
 
index 8c6fe06d4d65ba2eeb8eee9fd62e0a69a5b65eae..ea2171e802a61f46b1e41b70a6b85969e30d6b49 100644 (file)
@@ -42,7 +42,7 @@ abstract class AbstractCommentStatDailyHandler extends AbstractStatDailyHandler
                     SELECT      COUNT(*)
                     FROM        wcf" . WCF_N . "_comment_response comment_response
                     LEFT JOIN   wcf" . WCF_N . "_comment comment
-                    ON          (comment.commentID = comment_response.commentID)
+                    ON          comment.commentID = comment_response.commentID
                     WHERE       comment.objectTypeID = ?
                             AND comment_response.time BETWEEN ? AND ?
                 )";
@@ -66,7 +66,7 @@ abstract class AbstractCommentStatDailyHandler extends AbstractStatDailyHandler
                     SELECT      COUNT(*)
                     FROM        wcf" . WCF_N . "_comment_response comment_response
                     LEFT JOIN   wcf" . WCF_N . "_comment comment
-                    ON          (comment.commentID = comment_response.commentID)
+                    ON          comment.commentID = comment_response.commentID
                     WHERE       comment.objectTypeID = ?
                             AND comment_response.time < ?
                 )";
index cbb233c3f80dff5554708d2cc41026ef6c489f69..1c2d04d89e75b72c79d3b9814fa4995b6467c997 100644 (file)
@@ -205,7 +205,7 @@ class TagEngine extends SingletonFactory
         $sql = "SELECT      tag.*, tag_to_object.objectID
                 FROM        wcf" . WCF_N . "_tag_to_object tag_to_object
                 LEFT JOIN   wcf" . WCF_N . "_tag tag
-                ON          (tag.tagID = tag_to_object.tagID)
+                ON          tag.tagID = tag_to_object.tagID
                 " . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
index 947298cf1eb577e6de828a5f5dc94e1539a11239..07dd2921073506a1d1c93fede0f932d254b3eb20 100644 (file)
@@ -133,7 +133,7 @@ class TrophyConditionHandler extends SingletonFactory
     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) {
@@ -192,7 +192,7 @@ class TrophyConditionHandler extends SingletonFactory
         $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
index 515cdfaa60dc4d3aa205197514570a157371649f..4cb958896f479c26fbf2a71d7887e82964bc1a32 100644 (file)
@@ -433,9 +433,9 @@ class UserNotificationHandler extends SingletonFactory
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
                 FROM        wcf" . WCF_N . "_user_notification notification
                 LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
-                ON          (notification_event.eventID = notification.eventID)
+                ON          notification_event.eventID = notification.eventID
                 LEFT JOIN   wcf" . WCF_N . "_object_type object_type
-                ON          (object_type.objectTypeID = notification_event.objectTypeID)
+                ON          object_type.objectTypeID = notification_event.objectTypeID
                 " . $conditions . "
                 ORDER BY    notification.time DESC";
         $statement = WCF::getDB()->prepareStatement($sql, $limit, $offset);
index cb48f9dcdbc204938f4af730708d7355320db8d6..84c83069b64880bce00e9293b4b13f836f0ec850 100644 (file)
@@ -42,7 +42,7 @@ class ArticleCommentUserNotificationObjectType extends AbstractUserNotificationO
         $sql = "SELECT      article.userID
                 FROM        wcf" . WCF_N . "_comment comment
                 LEFT JOIN   wcf" . WCF_N . "_article article
-                ON          (article.articleID = comment.objectID)
+                ON          article.articleID = comment.objectID
                 WHERE       comment.commentID = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute([$objectID]);
index fce6255e813946bb0aa07416796c3b77252182c9..f36a41bc1492def6bf7a20b5bb37ffdef2ba62ab 100644 (file)
@@ -49,7 +49,7 @@ trait TMultiRecipientModerationQueueCommentUserNotificationObjectType
             SELECT      DISTINCT comment_response.userID
             FROM        wcf" . WCF_N . "_comment_response comment_response
             INNER JOIN  wcf" . WCF_N . "_comment comment
-            ON          (comment.commentID = comment_response.commentID)
+            ON          comment.commentID = comment_response.commentID
             WHERE       comment.objectID = ?
                     AND comment.objectTypeID = ?
         )";
index 748d465fc3d07e46d6cd30ccb4aaed976d155a81..951b3a379ffdf34d990ffb8cdc9700b714866514 100644 (file)
@@ -141,7 +141,7 @@ class MailWorker extends AbstractWorker
         $sql = "SELECT      user_option.*, user.*
                 FROM        wcf" . WCF_N . "_user user
                 LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option
-                ON          (user_option.userID = user.userID)
+                ON          user_option.userID = user.userID
                 " . $this->conditions . "
                 ORDER BY    user.userID";
         $statement = WCF::getDB()->prepareStatement($sql, $this->limit, $this->limit * $this->loopCount);
index abad7a34f8b04378e1e45630d7f3a8ab6daacb69..9f49b3e00da4a8ce772374588ed7021c99e90a55 100644 (file)
@@ -55,7 +55,7 @@ class UserActivityPointItemsRebuildDataWorker extends AbstractRebuildDataWorker
 
         $sql = "UPDATE      wcf" . WCF_N . "_user_activity_point user_activity_point
                 LEFT JOIN   wcf" . WCF_N . "_user user_table
-                ON          (user_table.userID = user_activity_point.userID)
+                ON          user_table.userID = user_activity_point.userID
                 SET         user_activity_point.items = user_table.likesReceived,
                             user_activity_point.activityPoints = user_activity_point.items * ?
                 " . $conditionBuilder;
index 0ad874e5a8f81a007ed03177bcc3ff81c738181e..c93d4aee57953e5264f951e7f3aa25c0fbafd2e6 100644 (file)
@@ -47,7 +47,7 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
         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';
     }
 
@@ -114,9 +114,9 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
                                     SELECT      COUNT(*)
                                     FROM        wcf" . WCF_N . "_user_trophy user_trophy
                                     LEFT JOIN   wcf" . WCF_N . "_trophy trophy
-                                    ON          (user_trophy.trophyID = trophy.trophyID)
+                                    ON          user_trophy.trophyID = trophy.trophyID
                                     LEFT JOIN   wcf" . WCF_N . "_category trophy_category
-                                    ON          (trophy.categoryID = trophy_category.categoryID)
+                                    ON          trophy.categoryID = trophy_category.categoryID
                                     WHERE           user_trophy.userID = user_table.userID
                                                 AND trophy.isDisabled = 0
                                                 AND trophy_category.isDisabled = 0
index db992060b7164f86f6d40c06d7951c1aeceb4324..3204a965c4fecadb72a39bad34dcd4fbb716d257 100644 (file)
@@ -165,7 +165,7 @@ class MessageUtil
             $sql = "SELECT      user_table.username
                     FROM        wcf" . WCF_N . "_user_to_group user_to_group
                     LEFT JOIN   wcf" . WCF_N . "_user user_table
-                    ON          (user_table.userID = user_to_group.userID)
+                    ON          user_table.userID = user_to_group.userID
                     " . $conditions;
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute($conditions->getParameters());