aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMax Krivanek <thekigen@gmail.com>2016-07-06 23:00:35 -0500
committerMax Krivanek <thekigen@gmail.com>2016-07-06 23:00:35 -0500
commit1c52968df648085af1089a6cd4eb222421111b57 (patch)
tree31c3e200f8c60b8e818762083403b8fb48873277 /phpBB/includes/functions_admin.php
parentc4b93c9c1c7c820cdefaaeb7f6e9101eeda233a8 (diff)
downloadforums-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/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php9
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))
{