From 632ca9fe346c7bb724bc254f2d72800995773b8c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 1 Feb 2015 18:50:38 +0100 Subject: [PATCH] Processing 100 instead of 50 comments per iteration --- .../files/acp/rebuild_comments_com.woltlab.wcf_2.1.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php index 78f6c68b23..0bb43e4d09 100644 --- a/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php +++ b/wcfsetup/install/files/acp/rebuild_comments_com.woltlab.wcf_2.1.php @@ -9,6 +9,7 @@ use wcf\system\WCF; * @package com.woltlab.wcf * @category Community Framework */ +$commentsPerRun = 100; $rebuildData = WCF::getSession()->getVar('__wcfUpdateRebuildComments'); if ($rebuildData === null) { $sql = "SELECT COUNT(*) AS count @@ -24,19 +25,19 @@ if ($rebuildData === null) { ); if ($row['count']) { - $rebuildData['max'] = ceil($row['count'] / 50); + $rebuildData['max'] = ceil($row['count'] / $commentsPerRun); } } if ($rebuildData['max']) { - $offset = $rebuildData['i'] * 50; + $offset = $rebuildData['i'] * $commentsPerRun; // get comments $sql = "SELECT commentID FROM wcf".WCF_N."_comment WHERE responses > ? ORDER BY commentID"; - $statement = WCF::getDB()->prepareStatement($sql, 50, $offset); + $statement = WCF::getDB()->prepareStatement($sql, $commentsPerRun, $offset); $statement->execute(array(3)); $commentData = array(); -- 2.20.1