diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-21 22:28:33 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-21 22:28:33 -0400 |
commit | 3503d7f47b25c5e22bc9188d9182723db0d5d0ab (patch) | |
tree | 7de8e572496f13ff1e43aa5c5e0426e08a33cba7 /phpBB/includes/functions.php | |
parent | d0b9864563e8a9f83ea32f9db374d9100b73d41c (diff) | |
parent | 896b43aa5b7fe439106beb50cf56d6f066928537 (diff) | |
download | forums-3503d7f47b25c5e22bc9188d9182723db0d5d0ab.tar forums-3503d7f47b25c5e22bc9188d9182723db0d5d0ab.tar.gz forums-3503d7f47b25c5e22bc9188d9182723db0d5d0ab.tar.bz2 forums-3503d7f47b25c5e22bc9188d9182723db0d5d0ab.tar.xz forums-3503d7f47b25c5e22bc9188d9182723db0d5d0ab.zip |
Merge PR #812 branch 'bantu/ticket/10565' into develop-olympus
* bantu/ticket/10565:
[ticket/10565] Add line breaks to query in order to follow coding guidelines.
[ticket/10565] update_forum_tracking_info(): Remove unnecessary GROUP BY clause
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ce80dc4a66..bc811cc75b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1918,14 +1918,17 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti } else { - $sql = 'SELECT t.forum_id FROM ' . TOPICS_TABLE . ' t - LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ') + $sql = 'SELECT t.forum_id + FROM ' . TOPICS_TABLE . ' t + LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt + ON (tt.topic_id = t.topic_id + AND tt.user_id = ' . $user->data['user_id'] . ') WHERE t.forum_id = ' . $forum_id . ' AND t.topic_last_post_time > ' . $mark_time_forum . ' AND t.topic_moved_id = 0 ' . $sql_update_unapproved . ' - AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time) - GROUP BY t.forum_id'; + AND (tt.topic_id IS NULL + OR tt.mark_time < t.topic_last_post_time)'; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); |