(bug 16839) cleanupTitles and namespaceDupes shouldn't consider 'Special' or 'Media...
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 2 Jan 2009 19:52:57 +0000 (19:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 2 Jan 2009 19:52:57 +0000 (19:52 +0000)
includes/Title.php
maintenance/cleanupTitles.php

index a35dbb4..17107c7 100644 (file)
@@ -3172,6 +3172,15 @@ class Title {
        public function isKnown() {
                return $this->exists() || $this->isAlwaysKnown();
        }
+       
+       /**
+       * Is this in a namespace that allows actual pages?
+       *
+       * @return \type{\bool} TRUE or FALSE
+       */
+       public function canExist() {
+               return $this->mNamespace >= 0 && $this->mNamespace != NS_MEDIA;
+       }
 
        /**
         * Update page_touched timestamps and send squid purge messages for
index 3f29d31..4d76ac7 100644 (file)
@@ -48,7 +48,7 @@ class TitleCleanup extends TableCleanup {
 
                $title = Title::newFromText( $verified );
 
-               if( !is_null( $title ) && $title->equals( $current ) ) {
+               if( !is_null( $title ) && $title->equals( $current ) && $title->canExist() ) {
                        return $this->progress( 0 );  // all is fine
                }