X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfixDoubleRedirects.php;h=0b3cdba4c2cd2d0e1cc8d139705cd0194bcc47f6;hb=67c63613de88d4919d232118e18fd91424697a0d;hp=b5dc1e3b0e14421cdee8900339047d1a98d211c1;hpb=b64bc4e9693ec3e676dadc766f75030d8b11a43b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fixDoubleRedirects.php b/maintenance/fixDoubleRedirects.php index b5dc1e3b0e..0b3cdba4c2 100644 --- a/maintenance/fixDoubleRedirects.php +++ b/maintenance/fixDoubleRedirects.php @@ -85,6 +85,7 @@ class FixDoubleRedirects extends Maintenance { if ( !$res->numRows() ) { $this->output( "No double redirects found.\n" ); + return; } @@ -94,6 +95,7 @@ class FixDoubleRedirects extends Maintenance { foreach ( $res as $row ) { $titleA = Title::makeTitle( $row->pa_namespace, $row->pa_title ); $titleB = Title::makeTitle( $row->pb_namespace, $row->pb_title ); + RequestContext::getMain()->setTitle( $titleA ); $processedTitles .= "* [[$titleA]]\n"; @@ -105,7 +107,8 @@ class FixDoubleRedirects extends Maintenance { if ( !$async ) { $success = ( $dryrun ? true : $job->run() ); if ( !$success ) { - $this->error( "Error fixing " . $titleA->getPrefixedText() . ": " . $job->getLastError() . "\n" ); + $this->error( "Error fixing " . $titleA->getPrefixedText() + . ": " . $job->getLastError() . "\n" ); } } else { $jobs[] = $job;