make links to MediaWiki pages blue for messages with default values
authorIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 9 May 2007 18:41:05 +0000 (18:41 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 9 May 2007 18:41:05 +0000 (18:41 +0000)
RELEASE-NOTES
includes/SkinTemplate.php
includes/Title.php

index 72fe6dc..b6a22b5 100644 (file)
@@ -45,6 +45,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 9854, 3770) Clip overflow text in gallery boxes for visual cleanliness
   instead of letting it flow outside the box or trigger ugly scroll bars.
 * Tooltips for print version and permalink
+* Links to the MediaWiki namespace for system messages having their default
+  values are no longer shown as redlinks
 
 == Maintenance script changes since 1.10 ==
 
index d776fb8..2f61a0b 100644 (file)
@@ -591,7 +591,7 @@ class SkinTemplate extends Skin {
                if( $selected ) {
                        $classes[] = 'selected';
                }
-               if( $checkEdit && $title->getArticleId() == 0 ) {
+               if( $checkEdit && !$title->isAlwaysKnown() && $title->getArticleId() == 0 ) {
                        $classes[] = 'new';
                        $query = 'action=edit';
                }
index b108e66..1e2bff6 100644 (file)
@@ -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 ) ) );
        }
 
        /**