summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmmarpad <ammarpad@yahoo.com>2022-01-23 13:12:04 +0100
committerAmmarpad <ammarpad@yahoo.com>2022-01-23 13:22:17 +0100
commit02766e0e27e9310b179612f6b7212863a540929a (patch)
tree4478fbbeac5781b84cf81c587e35e39e8d802a8a
parenteb9e91aef015d6bec3f47d1a76344bd2ce56e962 (diff)
recountCategories.php: Fix varibale shadowing
Change-Id: I9333afad473836c1e3abf2bdd0d8841830a7e523
-rw-r--r--maintenance/recountCategories.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/maintenance/recountCategories.php b/maintenance/recountCategories.php
index 93b70d2b1470..94d726020a24 100644
--- a/maintenance/recountCategories.php
+++ b/maintenance/recountCategories.php
@@ -75,15 +75,15 @@ TEXT
}
public function execute() {
- $mode = $this->getOption( 'mode' );
- if ( !in_array( $mode, [ 'pages', 'subcats', 'files', 'all' ] ) ) {
+ $originalMode = $this->getOption( 'mode' );
+ if ( !in_array( $originalMode, [ 'pages', 'subcats', 'files', 'all' ] ) ) {
$this->fatalError( 'Please specify a valid mode: one of "pages", "subcats", "files" or "all".' );
}
- if ( $mode === 'all' ) {
+ if ( $originalMode === 'all' ) {
$modes = [ 'pages', 'subcats', 'files' ];
} else {
- $modes = [ $mode ];
+ $modes = [ $originalMode ];
}
foreach ( $modes as $mode ) {
@@ -102,7 +102,7 @@ TEXT
// Finished
$this->output( "Done!\n" );
- if ( $mode !== 'all' ) {
+ if ( $originalMode !== 'all' ) {
$this->output( "Now run the script using the other --mode options if you haven't already.\n" );
}