X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupTitles.php;h=0df9e7fe0c880b2f3169b5658ab1415b78d30eb7;hb=d77af6ef2157fcb29953b283bc5c5723fdf9b9ad;hp=72b6aa59a006ddac7c2391915ce48d46f3a9178f;hpb=43b7373b48e210ca38cdc46162f5bfb0e812b277;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 72b6aa59a0..0df9e7fe0c 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -148,9 +148,15 @@ class TitleCleanup extends TableCleanup { $ns = 0; } + # Namespace which no longer exists. Put the page in the main namespace + # since we don't have any idea of the old namespace name. See bug 68501. + if ( !MWNamespace::exists( $ns ) ) { + $ns = 0; + } + $clean = 'Broken/' . $prior; $verified = Title::makeTitleSafe( $ns, $clean ); - if ( $verified->exists() ) { + if ( !$verified || $verified->exists() ) { $blah = "Broken/id:" . $row->page_id; $this->output( "Couldn't legalize; form '$clean' exists; using '$blah'\n" ); $verified = Title::makeTitleSafe( $ns, $blah );