summaryrefslogtreecommitdiff
path: root/maintenance/initStats.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/initStats.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/initStats.php')
-rw-r--r--maintenance/initStats.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/maintenance/initStats.php b/maintenance/initStats.php
index b92d46c5..1ec5c925 100644
--- a/maintenance/initStats.php
+++ b/maintenance/initStats.php
@@ -1,5 +1,4 @@
<?php
-
/**
* Maintenance script to re-initialise or update the site statistics table
*
@@ -18,13 +17,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
* @author Brion Vibber
* @author Rob Church <robchur@gmail.com>
- * @licence GNU General Public Licence 2.0 or later
*/
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class InitStats extends Maintenance {
public function __construct() {
@@ -56,13 +55,13 @@ class InitStats extends Maintenance {
$image = $counter->files();
$this->output( "{$image}\n" );
- if( !$this->hasOption('noviews') ) {
+ if ( !$this->hasOption( 'noviews' ) ) {
$this->output( "Counting total page views..." );
$views = $counter->views();
$this->output( "{$views}\n" );
}
- if( $this->hasOption( 'active' ) ) {
+ if ( $this->hasOption( 'active' ) ) {
$this->output( "Counting active users..." );
$active = SiteStatsUpdate::cacheUpdate();
$this->output( "{$active}\n" );
@@ -70,7 +69,7 @@ class InitStats extends Maintenance {
$this->output( "\nUpdating site statistics..." );
- if( $this->hasOption( 'update' ) ) {
+ if ( $this->hasOption( 'update' ) ) {
$counter->update();
} else {
$counter->refresh();
@@ -81,4 +80,4 @@ class InitStats extends Maintenance {
}
$maintClass = "InitStats";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );