made some more wfMsg() to wfMsgForContent changes
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Wed, 22 Sep 2004 04:09:31 +0000 (04:09 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Wed, 22 Sep 2004 04:09:31 +0000 (04:09 +0000)
includes/Database.php
includes/Setup.php
includes/SpecialDisambiguations.php
includes/killthread.php
index.php

index 9e32024..a032abc 100644 (file)
@@ -1330,7 +1330,7 @@ function wfEmergencyAbort( &$conn, $error ) {
                                echo wfMsgNoDB( 'googlesearch', htmlspecialchars( $search ), $wgInputEncoding );
                                wfErrorExit();
                        } else {
-                               $t = Title::newFromText( wfMsgNoDB( 'mainpage' ) );
+                               $t = Title::newFromText( wfMsgNoDBForContent( 'mainpage' ) );
                        }
                }
 
index 7163f35..51f70f9 100644 (file)
@@ -328,7 +328,7 @@ $wgDBConnections = array();
 wfSeedRandom();
 
 # Placeholders in case of DB error
-$wgTitle = Title::newFromText( wfMsg( 'badtitle' ) );
+$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
 $wgArticle = new Article($wgTitle);
 
 wfProfileOut( $fname.'-misc2' );
index b3a3ab8..5f76938 100644 (file)
@@ -28,14 +28,14 @@ class DisambiguationsPage extends PageQueryPage {
                $sk = $wgUser->getSkin();
                
                #FIXME : probably need to add a backlink to the maintenance page.
-               return '<p>'.wfMsg("disambiguationstext", $sk->makeKnownLink(wfMsg('disambiguationspage')) )."</p><br>\n";
+               return '<p>'.wfMsg("disambiguationstext", $sk->makeKnownLink(wfMsgForContent('disambiguationspage')) )."</p><br>\n";
        }
 
        function getSQL() {
                $dbr =& wfGetDB( DB_SLAVE );
                extract( $dbr->tableNames( 'cur', 'links' ) );
                
-               $dp = Title::newFromText(wfMsg("disambiguationspage"));
+               $dp = Title::newFromText(wfMsgForContent("disambiguationspage"));
                $dpid = $dp->getArticleID();
                        
                $sql = "SELECT ca.cur_namespace AS ns_art, ca.cur_title AS title_art,"
index 819c91f..ce7e4a9 100644 (file)
@@ -19,7 +19,7 @@ ini_set( 'include_path', "$IP$sep$include_path" );
 
 require_once( 'Setup.php' );
 
-$wgTitle = Title::newFromText( wfMsg( 'badtitle' ) );
+$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
 $wgArticle = new Article($wgTitle);
 
 if ( !$argv[1] || !$argv[2] ) {
index 755e04a..9b829c7 100644 (file)
--- a/index.php
+++ b/index.php
@@ -28,7 +28,7 @@ $action = $wgRequest->getVal( "action", "view" );
 $title = $wgRequest->getVal( "title" );
 
 # Placeholders in case of DB error
-$wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
+$wgTitle = Title::newFromText( wfMsgForContent( "badtitle" ) );
 $wgArticle = new Article($wgTitle);
 
 $action = strtolower( trim( $action ) );
@@ -37,7 +37,7 @@ if ($wgRequest->getVal( "printable" ) == "yes") {
 }
 
 if ( "" == $title && "delete" != $action ) {
-       $wgTitle = Title::newFromText( wfMsg( "mainpage" ) );
+       $wgTitle = Title::newFromText( wfMsgForContent( "mainpage" ) );
 } elseif ( $curid = $wgRequest->getInt( 'curid' ) ) {
        # URLs like this are generated by RC, because rc_title isn't always accurate
        $wgTitle = Title::newFromID( $curid );
@@ -69,7 +69,7 @@ if( !is_null( $search ) && $search !== '' ) {
                $searchEngine->goResult();
        }
 } else if( !$wgTitle or $wgTitle->getDBkey() == "" ) {
-       $wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
+       $wgTitle = Title::newFromText( wfMsgForContent( "badtitle" ) );
        $wgOut->errorpage( "badtitle", "badtitletext" );
 } else if ( $wgTitle->getInterwiki() != "" ) {
        $url = $wgTitle->getFullURL();
@@ -77,7 +77,7 @@ if( !is_null( $search ) && $search !== '' ) {
        if ( !preg_match( "/^" . preg_quote( $wgServer, "/" ) . "/", $url ) && $wgTitle->isLocal() ) {
                $wgOut->redirect( $url );
        } else {
-               $wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
+               $wgTitle = Title::newFromText( wfMsgForContent( "badtitle" ) );
                $wgOut->errorpage( "badtitle", "badtitletext" );
        }
 } else if ( ( $action == "view" ) &&