Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index facc506..b099aff 100644 (file)
@@ -72,13 +72,13 @@ class RefreshLinks extends Maintenance {
                        if ( !$title ) {
                                $this->error( "'$category' is an invalid category name!\n", true );
                        }
-                       $this->refreshCategory( $category );
+                       $this->refreshCategory( $title );
                } elseif ( ( $category = $this->getOption( 'tracking-category', false ) ) !== false ) {
                        $this->refreshTrackingCategory( $category );
                } elseif ( !$this->hasOption( 'dfn-only' ) ) {
-                       $new = $this->getOption( 'new-only', false );
-                       $redir = $this->getOption( 'redirects-only', false );
-                       $oldRedir = $this->getOption( 'old-redirects-only', false );
+                       $new = $this->hasOption( 'new-only' );
+                       $redir = $this->hasOption( 'redirects-only' );
+                       $oldRedir = $this->hasOption( 'old-redirects-only' );
                        $this->doRefreshLinks( $start, $new, $end, $redir, $oldRedir );
                        $this->deleteLinksFromNonexistent( null, null, $this->mBatchSize, $dfnChunkSize );
                } else {
@@ -448,7 +448,7 @@ class RefreshLinks extends Maintenance {
                do {
                        $finalConds = $conds;
                        $timestamp = $dbr->addQuotes( $timestamp );
-                       $finalConds []=
+                       $finalConds [] =
                                "(cl_timestamp > $timestamp OR (cl_timestamp = $timestamp AND cl_from > $lastId))";
                        $res = $dbr->select( [ 'page', 'categorylinks' ],
                                [ 'page_id', 'cl_timestamp' ],