Localisation updates for core and extension messages from translatewiki.net (2010...
[lhc/web/wiklou.git] / maintenance / initStats.php
index ce46284..9dd2721 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * Maintenance script to re-initialise or update the site statistics table
  *
  * 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( "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();