use wfMsgForContent() when creating new titles from text
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Wed, 22 Sep 2004 03:55:08 +0000 (03:55 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Wed, 22 Sep 2004 03:55:08 +0000 (03:55 +0000)
includes/Skin.php
includes/Title.php

index 46a9c95..9b40f6d 100644 (file)
@@ -1739,7 +1739,7 @@ class Skin {
                return $title->getLocalURL( $urlaction );
        }
        /*static*/ function makeI18nUrl ( $name, $urlaction='' ) {
-               $title = Title::newFromText( wfMsg($name) );
+               $title = Title::newFromText( wfMsgForContent($name) );
                $this->checkTitle($title, $name);
                return $title->getLocalURL( $urlaction );
        }
@@ -1783,7 +1783,7 @@ class Skin {
                );
        }
        /*static*/ function makeI18nUrlDetails ( $name, $urlaction='' ) {
-               $title = Title::newFromText( wfMsg($name) );
+               $title = Title::newFromText( wfMsgForContent($name) );
                $this->checkTitle($title, $name);
                return array(
                        'href' => $title->getLocalURL( $urlaction ),
index b84f149..a1b9f49 100644 (file)
@@ -167,7 +167,7 @@ class Title {
        }
 
        /* static */ function newMainPage() {
-               return Title::newFromText( wfMsg( 'mainpage' ) );
+               return Title::newFromText( wfMsgForContent( 'mainpage' ) );
        }
 
        # Get the title object for a redirect