Services: Convert PasswordReset's static to a const now HHVM is gone
[lhc/web/wiklou.git] / maintenance / populateCategory.php
index f2a0007..508960d 100644 (file)
@@ -93,9 +93,9 @@ TEXT
 
                $throttle = intval( $throttle );
                if ( $begin !== '' ) {
-                       $where = 'cl_to > ' . $dbw->addQuotes( $begin );
+                       $where = [ 'cl_to > ' . $dbw->addQuotes( $begin ) ];
                } else {
-                       $where = null;
+                       $where = [ '1 = 1' ];
                }
                $i = 0;
 
@@ -133,20 +133,14 @@ TEXT
                        usleep( $throttle * 1000 );
                }
 
-               if ( $dbw->insert(
+               $dbw->insert(
                        'updatelog',
                        [ 'ul_key' => 'populate category' ],
                        __METHOD__,
-                       'IGNORE'
-               ) ) {
-                       $this->output( "Category population complete.\n" );
-
-                       return true;
-               } else {
-                       $this->output( "Could not insert category population row.\n" );
+                       [ 'IGNORE' ]
+               );
 
-                       return false;
-               }
+               return true;
        }
 }