From: Zheng Zhu Date: Wed, 22 Sep 2004 04:09:31 +0000 (+0000) Subject: made some more wfMsg() to wfMsgForContent changes X-Git-Tag: 1.5.0alpha1~1891 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=ca7619c81c1eb7b735aaa62dc3d46e2a4dbea244;p=lhc%2Fweb%2Fwiklou.git made some more wfMsg() to wfMsgForContent changes --- diff --git a/includes/Database.php b/includes/Database.php index 9e32024e4a..a032abccbe 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -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' ) ); } } diff --git a/includes/Setup.php b/includes/Setup.php index 7163f35748..51f70f918e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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' ); diff --git a/includes/SpecialDisambiguations.php b/includes/SpecialDisambiguations.php index b3a3ab86fc..5f76938c06 100644 --- a/includes/SpecialDisambiguations.php +++ b/includes/SpecialDisambiguations.php @@ -28,14 +28,14 @@ class DisambiguationsPage extends PageQueryPage { $sk = $wgUser->getSkin(); #FIXME : probably need to add a backlink to the maintenance page. - return '

'.wfMsg("disambiguationstext", $sk->makeKnownLink(wfMsg('disambiguationspage')) )."


\n"; + return '

'.wfMsg("disambiguationstext", $sk->makeKnownLink(wfMsgForContent('disambiguationspage')) )."


\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," diff --git a/includes/killthread.php b/includes/killthread.php index 819c91fb57..ce7e4a92b2 100644 --- a/includes/killthread.php +++ b/includes/killthread.php @@ -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] ) { diff --git a/index.php b/index.php index 755e04ae6b..9b829c703b 100644 --- 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" ) &&