diff options
Diffstat (limited to 'www/wiki/extensions/Translate/scripts/languageeditstats.php')
-rw-r--r-- | www/wiki/extensions/Translate/scripts/languageeditstats.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/www/wiki/extensions/Translate/scripts/languageeditstats.php b/www/wiki/extensions/Translate/scripts/languageeditstats.php index 053627ad..7f67a1c4 100644 --- a/www/wiki/extensions/Translate/scripts/languageeditstats.php +++ b/www/wiki/extensions/Translate/scripts/languageeditstats.php @@ -5,7 +5,7 @@ * @author Niklas Laxström * @author Siebrand Mazeland * @copyright Copyright © 2008-2010 Niklas Laxström, Siebrand Mazeland - * @license GPL-2.0+ + * @license GPL-2.0-or-later * @file * @ingroup Script Stats */ @@ -19,7 +19,7 @@ if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { } require_once "$IP/maintenance/Maintenance.php"; -class LanguageEditStats extends Maintenance { +class Languageeditstats extends Maintenance { public function __construct() { parent::__construct(); $this->mDescription = 'Script to show number of edits per language for all message groups.'; @@ -48,15 +48,11 @@ class LanguageEditStats extends Maintenance { } public function execute() { - $hours = (int)$this->getOption( 'days' ); - $hours = $hours ? $hours * 7 : 7 * 24; - - $top = (int)$this->getOption( 'top' ); - $top = $top ? $top : 10; - + $hours = ( $this->getOption( 'days' ) ?: 7 ) * 24; + $top = (int)$this->getOption( 'top' ) ?: 10; $bots = $this->hasOption( 'bots' ); - $namespaces = array(); + $namespaces = []; if ( $this->hasOption( 'ns' ) ) { $input = explode( ',', $this->getOption( 'ns' ) ); @@ -75,7 +71,7 @@ class LanguageEditStats extends Maintenance { /** * Get counts for edits per language code after filtering out edits by FuzzyBot */ - $codes = array(); + $codes = []; global $wgTranslateFuzzyBotName; foreach ( $rows as $_ ) { // Filter out edits by $wgTranslateFuzzyBotName @@ -107,5 +103,5 @@ class LanguageEditStats extends Maintenance { } } -$maintClass = 'LanguageEditStats'; +$maintClass = Languageeditstats::class; require_once RUN_MAINTENANCE_IF_MAIN; |