[ticket/11691] Fix some minor comments

PHPBB3-11691
This commit is contained in:
Joas Schilling 2013-08-16 18:53:05 +02:00
parent a7cf62decf
commit e7c43dbb67

View file

@ -147,7 +147,7 @@ class softdelete_p1 extends \phpbb\db\migration\migration
{ {
$start = (int) $start; $start = (int) $start;
$limit = 10; $limit = 10;
$i = 0; $converted_forums = 0;
$sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS sum_topics, SUM(topic_posts_approved) AS sum_posts_approved, SUM(topic_posts_unapproved) AS sum_posts_unapproved $sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS sum_topics, SUM(topic_posts_approved) AS sum_posts_approved, SUM(topic_posts_unapproved) AS sum_posts_unapproved
FROM ' . $this->table_prefix . 'topics FROM ' . $this->table_prefix . 'topics
@ -157,7 +157,7 @@ class softdelete_p1 extends \phpbb\db\migration\migration
$update_forums = array(); $update_forums = array();
while ($row = $this->db->sql_fetchrow($result)) while ($row = $this->db->sql_fetchrow($result))
{ {
$i++; $converted_forums++;
$forum_id = (int) $row['forum_id']; $forum_id = (int) $row['forum_id'];
if (!isset($update_forums[$forum_id])) if (!isset($update_forums[$forum_id]))
@ -185,8 +185,7 @@ class softdelete_p1 extends \phpbb\db\migration\migration
$this->sql_query($sql); $this->sql_query($sql);
} }
if ($converted_forums < $limit)
if ($i < $limit)
{ {
// There are no more topics, we are done // There are no more topics, we are done
return; return;