Yet another attempt to fix the populateIpChanges script
[lhc/web/wiklou.git] / maintenance / populateCategory.php
index 5a8ef90..5dccdd6 100644 (file)
@@ -71,7 +71,7 @@ TEXT
        public function execute() {
                $begin = $this->getOption( 'begin', '' );
                $throttle = $this->getOption( 'throttle', 0 );
-               $force = $this->getOption( 'force', false );
+               $force = $this->hasOption( 'force' );
 
                $dbw = $this->getDB( DB_MASTER );
 
@@ -79,7 +79,7 @@ TEXT
                        $row = $dbw->selectRow(
                                'updatelog',
                                '1',
-                               array( 'ul_key' => 'populate category' ),
+                               [ 'ul_key' => 'populate category' ],
                                __METHOD__
                        );
                        if ( $row ) {
@@ -106,9 +106,9 @@ TEXT
                                'cl_to',
                                $where,
                                __METHOD__,
-                               array(
+                               [
                                        'ORDER BY' => 'cl_to'
-                               )
+                               ]
                        );
                        if ( !$row ) {
                                # Done, hopefully.
@@ -135,7 +135,7 @@ TEXT
 
                if ( $dbw->insert(
                        'updatelog',
-                       array( 'ul_key' => 'populate category' ),
+                       [ 'ul_key' => 'populate category' ],
                        __METHOD__,
                        'IGNORE'
                ) ) {