diff options
author | Andreas Fischer <bantu@phpbb.com> | 2010-06-17 19:18:18 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-06-17 19:18:18 +0200 |
commit | 389c24044a189aea5ae936c21b8df39cbb1b77f6 (patch) | |
tree | bd2afb1cb19526b809081e6ec131208eb8a9291e /phpBB/includes/functions.php | |
parent | cf1b0202da836801238ae6be9614df3e8ec9851b (diff) | |
parent | 6d248097e5422bf769fb3756e64e36e243865f79 (diff) | |
download | forums-389c24044a189aea5ae936c21b8df39cbb1b77f6.tar forums-389c24044a189aea5ae936c21b8df39cbb1b77f6.tar.gz forums-389c24044a189aea5ae936c21b8df39cbb1b77f6.tar.bz2 forums-389c24044a189aea5ae936c21b8df39cbb1b77f6.tar.xz forums-389c24044a189aea5ae936c21b8df39cbb1b77f6.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/9132] Oracle CLOB support is broken, preventing storage of long strings
[ticket/9606] Optimize unread search option.
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3e80f93114..3f097f171f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1660,10 +1660,11 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis * @param string $sql_extra Extra WHERE SQL statement * @param string $sql_sort ORDER BY SQL sorting statement * @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query +* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start * * @return array[int][int] Topic ids as keys, mark_time of topic as value */ -function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001) +function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0) { global $config, $db, $user; @@ -1709,7 +1710,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s ); $sql = $db->sql_build_query('SELECT', $sql_array); - $result = $db->sql_query_limit($sql, $sql_limit); + $result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset); while ($row = $db->sql_fetchrow($result)) { @@ -1742,7 +1743,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s WHERE t.topic_last_post_time > ' . $user_lastmark . " $sql_extra $sql_sort"; - $result = $db->sql_query_limit($sql, $sql_limit); + $result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset); while ($row = $db->sql_fetchrow($result)) { |