diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-21 22:28:37 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-21 22:28:37 -0400 |
commit | 44b3ab102a89ba02afd522a9ff240006ff9c61bf (patch) | |
tree | 0a069584ca92f5694d387c2d335cb9ca4720f552 | |
parent | d0e63a4f372ae4b4b753c898b8f5c0ff85c886c6 (diff) | |
parent | 3503d7f47b25c5e22bc9188d9182723db0d5d0ab (diff) | |
download | forums-44b3ab102a89ba02afd522a9ff240006ff9c61bf.tar forums-44b3ab102a89ba02afd522a9ff240006ff9c61bf.tar.gz forums-44b3ab102a89ba02afd522a9ff240006ff9c61bf.tar.bz2 forums-44b3ab102a89ba02afd522a9ff240006ff9c61bf.tar.xz forums-44b3ab102a89ba02afd522a9ff240006ff9c61bf.zip |
Merge PR #812 branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10565] Add line breaks to query in order to follow coding guidelines.
[ticket/10565] update_forum_tracking_info(): Remove unnecessary GROUP BY clause
-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 28f06abbc1..0eb0b9c26f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1691,14 +1691,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); |