From 749211fcb10ccfbc66ce49ec47306699ba637f43 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 7 Apr 2021 07:12:08 +0200 Subject: [PATCH] Properly increase the index counter. --- NEWS.md | 7 +++++++ linktitles-cli.php | 1 + 2 files changed, 8 insertions(+) diff --git a/NEWS.md b/NEWS.md index 788f5bb..2007904 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 For changes prior to version 6.0.0, please see [`NEWS.old`](news.old). +## Unreleased + +### Fixed + +- Fixed a regression concerning `linktitles-cli` progress display that was + introduced in v8.0.0. + ## [8.0.0][] - 2021-04-06 ### Changed diff --git a/linktitles-cli.php b/linktitles-cli.php index 1274c46..0bf1cc8 100755 --- a/linktitles-cli.php +++ b/linktitles-cli.php @@ -177,6 +177,7 @@ class Cli extends \Maintenance { foreach ( $res as $row ) { $title = \Title::makeTitleSafe( $row->page_namespace, $row->page_title ); $numProcessed += 1; + $index += 1; $this->output( sprintf( "\rPage #%d (%02.0f%%) ", $index, $numProcessed / $numPages * 100 ) ); Extension::processPage( $title, $context ); }