X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupTitles.php;h=0df9e7fe0c880b2f3169b5658ab1415b78d30eb7;hb=347bb6aef6f169dd050afe6af71f608f996b9d51;hp=72b6aa59a006ddac7c2391915ce48d46f3a9178f;hpb=4b0be13e7531ee5ad890e9e1eeffa211d515294a;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 );