Merge "Added chunked upload support to upload.js"
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index 06fcbaf..facc506 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Maintenance
  */
 
+use Wikimedia\Rdbms\IDatabase;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -176,7 +178,6 @@ class RefreshLinks extends Maintenance {
                        $this->output( "Starting from page_id $start of $end.\n" );
 
                        for ( $id = $start; $id <= $end; $id++ ) {
-
                                if ( !( $id % self::REPORTING_INTERVAL ) ) {
                                        $this->output( "$id\n" );
                                        wfWaitForSlaves();
@@ -189,7 +190,6 @@ class RefreshLinks extends Maintenance {
                                $this->output( "Starting from page_id $start of $end.\n" );
 
                                for ( $id = $start; $id <= $end; $id++ ) {
-
                                        if ( !( $id % self::REPORTING_INTERVAL ) ) {
                                                $this->output( "$id\n" );
                                                wfWaitForSlaves();
@@ -276,6 +276,7 @@ class RefreshLinks extends Maintenance {
                        $page->getTitle(), /* $old = */ null, /* $recursive = */ false );
                foreach ( $updates as $update ) {
                        DeferredUpdates::addUpdate( $update );
+                       DeferredUpdates::doUpdates();
                }
        }
 
@@ -388,7 +389,7 @@ class RefreshLinks extends Maintenance {
         * By specifying a null $start or $end, it is also possible to create
         * half-bounded or unbounded intervals using this function.
         *
-        * @param IDatabase $db Database connection
+        * @param IDatabase $db
         * @param string $var Field name
         * @param mixed $start First value to include or null
         * @param mixed $end Last value to include or null