Provide RequestContext from fixDoubleRedirects
authorMark A. Hershberger <mah@everybody.org>
Sat, 22 Mar 2014 22:49:43 +0000 (18:49 -0400)
committerMarkAHershberger <mah@nichework.com>
Sat, 22 Mar 2014 22:53:26 +0000 (22:53 +0000)
Lots of code depends on RC having the title.  I think setting it to
titleA is correct here, but maybe it should be titleB.

Bug: 62966
Change-Id: I875e1bf8f6d3468ea78c5a557a07cb6384965514

maintenance/fixDoubleRedirects.php

index 8ae5a5a..be0b683 100644 (file)
@@ -94,6 +94,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";