Merge "Change X-UA-Compatible from <meta> tag to HTTP header"
[lhc/web/wiklou.git] / maintenance / fixDoubleRedirects.php
index b5dc1e3..0b3cdba 100644 (file)
@@ -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;