API: documentation and cleanup.
[lhc/web/wiklou.git] / includes / Title.php
index 0ff2e80..63b0485 100644 (file)
@@ -40,7 +40,7 @@ class Title {
         * Please use the accessor functions
         */
 
-        /**#@+
+       /**#@+
         * @private
         */
 
@@ -232,7 +232,7 @@ class Title {
                $t = new Title();
                $t->mInterwiki = '';
                $t->mFragment = '';
-               $t->mNamespace = intval( $ns );
+               $t->mNamespace = $ns = intval( $ns );
                $t->mDbkeyform = str_replace( ' ', '_', $title );
                $t->mArticleID = ( $ns >= 0 ) ? -1 : 0;
                $t->mUrlform = wfUrlencode( $t->mDbkeyform );
@@ -2407,11 +2407,14 @@ class Title {
         * Should a link should be displayed as a known link, just based on its title?
         *
         * Currently, a self-link with a fragment and special pages are in
-        * this category. Special pages never exist in the database.
+        * this category. Special pages never exist in the database. System
+        * messages that have defined default values are also always known.
         */
        public function isAlwaysKnown() {
-               return  $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform )
-                 || NS_SPECIAL == $this->mNamespace;
+               return ( $this->isExternal() ||
+                        ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) ||
+                        ( NS_SPECIAL == $this->mNamespace ) ||
+                        ( NS_MEDIAWIKI == $this->mNamespace && wfMsgWeirdKey( $this->mDbkeyform ) ) );
        }
 
        /**