From: Jure Kajzer Date: Wed, 2 Dec 2009 13:37:24 +0000 (+0000) Subject: (bug 18762) both redirects and links fixed if redirects-only switch not present X-Git-Tag: 1.31.0-rc.0~38657 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=d19c944694ca28c97729a6dcec751f5946a93d38;p=lhc%2Fweb%2Fwiklou.git (bug 18762) both redirects and links fixed if redirects-only switch not present --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b73b43e6db..b411ed1e4c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -658,6 +658,8 @@ Hopefully we will remove this configuration var soon) * (bug 21679) "Edit block reasons" link at the bottom of Special:Blockip is now only displayed to the users that have "editinterface" right * (bug 21740) Attempting to protect a page that doesn't exist (salting) returns "unknown error" +* (bug 18762) both redirects and links get fixed one after another if + redirects-only switch is not present == API changes in 1.16 == diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 58c789c8a3..c75554e25d 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -122,10 +122,10 @@ class RefreshLinks extends Maintenance { $this->fixLinksFromArticle( $row->page_id ); } } else { - $this->output( "Refreshing $what table.\n" ); if ( !$end ) { $end = $dbr->selectField( 'page', 'max(page_id)', false ); } + $this->output( "Refreshing redirects table.\n" ); $this->output( "Starting from page_id $start of $end.\n" ); for ($id = $start; $id <= $end; $id++) { @@ -134,10 +134,21 @@ class RefreshLinks extends Maintenance { $this->output( "$id\n" ); wfWaitForSlaves( $maxLag ); } - if($redirectsOnly) - $this->fixRedirect( $id ); - else + $this->fixRedirect( $id ); + } + + if(!$redirectsOnly) { + $this->output( "Refreshing links table.\n" ); + $this->output( "Starting from page_id $start of $end.\n" ); + + for ($id = $start; $id <= $end; $id++) { + + if ( !($id % $reportingInterval) ) { + $this->output( "$id\n" ); + wfWaitForSlaves( $maxLag ); + } $this->fixLinksFromArticle( $id ); + } } } }