diff options
author | Max Krivanek <thekigen@gmail.com> | 2016-07-06 23:00:35 -0500 |
---|---|---|
committer | Max Krivanek <thekigen@gmail.com> | 2016-07-06 23:00:35 -0500 |
commit | 1c52968df648085af1089a6cd4eb222421111b57 (patch) | |
tree | 31c3e200f8c60b8e818762083403b8fb48873277 /phpBB/includes | |
parent | c4b93c9c1c7c820cdefaaeb7f6e9101eeda233a8 (diff) | |
download | forums-1c52968df648085af1089a6cd4eb222421111b57.tar forums-1c52968df648085af1089a6cd4eb222421111b57.tar.gz forums-1c52968df648085af1089a6cd4eb222421111b57.tar.bz2 forums-1c52968df648085af1089a6cd4eb222421111b57.tar.xz forums-1c52968df648085af1089a6cd4eb222421111b57.zip |
[ticket/14616] Switch prune limit to sql_query_limit instead of sql_and
PHPBB3-14616
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_admin.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 323825d4cc..7d52491086 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2573,11 +2573,6 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync $sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date"; } - if ($prune_limit > 0) - { - $sql_and .= " LIMIT $prune_limit"; - } - /** * Use this event to modify the SQL that selects topics to be pruned * @@ -2608,7 +2603,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync WHERE ' . $db->sql_in_set('forum_id', $forum_id) . " AND poll_start = 0 $sql_and"; - $result = $db->sql_query($sql); + $result = $db->sql_query_limit($sql, $prune_limit); $topic_list = array(); while ($row = $db->sql_fetchrow($result)) @@ -2625,7 +2620,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync AND poll_start > 0 AND poll_last_vote < $prune_date $sql_and"; - $result = $db->sql_query($sql); + $result = $db->sql_query_limit($sql, $prune_limit); while ($row = $db->sql_fetchrow($result)) { |