diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2015-06-30 09:55:23 +0200 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2015-06-30 10:32:00 +0200 |
commit | c7f10ec4d455877b8df96c00f28ada0bcb84f17b (patch) | |
tree | b4640833be9f1d4387429abb4d05a977fc957c47 | |
parent | 6de5e5cc36d4b934cfa4043faf12adb279f8a2c6 (diff) | |
download | forums-c7f10ec4d455877b8df96c00f28ada0bcb84f17b.tar forums-c7f10ec4d455877b8df96c00f28ada0bcb84f17b.tar.gz forums-c7f10ec4d455877b8df96c00f28ada0bcb84f17b.tar.bz2 forums-c7f10ec4d455877b8df96c00f28ada0bcb84f17b.tar.xz forums-c7f10ec4d455877b8df96c00f28ada0bcb84f17b.zip |
[ticket/13891] Updated range description
Does not count #0 as a potential record
PHPBB3-13891
-rw-r--r-- | phpBB/language/en/cli.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/reparser/reparse.php | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index d1f229272c..b8e7d25f60 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -85,5 +85,5 @@ $lang = array_merge($lang, array( 'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.', - 'CLI_REPARSER_REPARSE_REPARSING' => 'Reparsing %1$s from %2$d to %3$d', + 'CLI_REPARSER_REPARSE_REPARSING' => 'Reparsing %1$s (range %2$d..%3$d)', )); diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php index a2b8b71818..e922ea90e3 100644 --- a/phpBB/phpbb/console/command/reparser/reparse.php +++ b/phpBB/phpbb/console/command/reparser/reparse.php @@ -56,7 +56,7 @@ class reparse extends \phpbb\console\command\command null, InputOption::VALUE_REQUIRED, $this->user->lang('CLI_DESCRIPTION_REPARSER_REPARSE_OPT_RANGE_MIN'), - 0 + 1 ) ->addOption( 'range-max', @@ -123,19 +123,19 @@ class reparse extends \phpbb\console\command\command $output->writeLn($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', str_replace('text_reparser.', '', $name), $min, $max) . '</info>'); - $progress = new ProgressBar($output, $max - $min); + $progress = new ProgressBar($output, $max + 1 - $min); $progress->start(); // Start from $max and decrement $current by $size until we reach $min $current = $max; - while ($current > $min) + while ($current >= $min) { $start = max($min, $current + 1 - $size); - $end = $current; + $end = max($min, $current); $reparser->reparse_range($start, $end); - $current = max($min, $start - 1); - $progress->setProgress($max - $current); + $current = $start - 1; + $progress->setProgress($max + 1 - $start); } $progress->finish(); |