$text == '' ? $l : $text );
}
- $s .= implode( htmlspecialchars( wfMsgExt( 'pipe-separator', 'escapenoentities' ) ), $langs );
+ $s .= implode( wfMessage( 'pipe-separator' )->escaped(), $langs );
if ( $wgContLang->isRTL() ) {
$s = Html::rawElement( 'span', array( 'dir' => "LTR" ), $s );
public function getCacheMode( $params ) {
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
- // formatComment() calls wfMsg() among other things
+ // formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
} else {
return 'public';
public function getCacheMode( $params ) {
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
- // formatComment() calls wfMsg() among other things
+ // formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
} else {
return 'public';
return 'private';
}
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
- // formatComment() calls wfMsg() among other things
+ // formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
}
return 'public';
return 'private';
}
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
- // formatComment() calls wfMsg() among other things
+ // formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
}
return 'public';
* @return String
*/
public function getReadableName() {
- return wfMsg( 'config-type-' . $this->getName() );
+ return wfMessage( 'config-type-' . $this->getName() )->text();
}
/**
public function getInstallUserBox() {
return
Html::openElement( 'fieldset' ) .
- Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
+ Html::element( 'legend', array(), wfMessage( 'config-db-install-account' )->text() ) .
$this->getTextBox( '_InstallUser', 'config-db-username', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
$this->getPasswordBox( '_InstallPassword', 'config-db-password', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
Html::closeElement( 'fieldset' );
public function getWebUserBox( $noCreateMsg = false ) {
$wrapperStyle = $this->getVar( '_SameAccount' ) ? 'display: none' : '';
$s = Html::openElement( 'fieldset' ) .
- Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
+ Html::element( 'legend', array(), wfMessage( 'config-db-web-account' )->text() ) .
$this->getCheckBox(
'_SameAccount', 'config-db-web-account-same',
array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
$this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
$this->parent->getHelpBox( 'config-db-web-help' );
if ( $noCreateMsg ) {
- $s .= $this->parent->getWarningBox( wfMsgNoTrans( $noCreateMsg ) );
+ $s .= $this->parent->getWarningBox( wfMessage( $noCreateMsg )->plain() );
} else {
$s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' );
}
/**
* UI interface for displaying a short message
- * The parameters are like parameters to wfMsg().
+ * The parameters are like parameters to wfMessage().
* The messages will be in wikitext format, which will be converted to an
* output format such as HTML or text before being sent to the user.
* @param $msg
$allNames = array();
foreach ( self::getDBTypes() as $name ) {
- $allNames[] = wfMsg( "config-type-$name" );
+ $allNames[] = wfMessage( "config-type-$name" )->text();
}
// cache initially available databases to make sure that everything will be displayed correctly
$status = Status::newGood();
try {
$page = WikiPage::factory( Title::newMainPage() );
- $page->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
- wfMsgForContent( 'mainpagedocfooter' ),
- '',
- EDIT_NEW,
- false,
- User::newFromName( 'MediaWiki default' ) );
+ $page->doEdit( wfMessage( 'mainpagetext' )->inContentLanguage()->text() . "\n\n" .
+ wfMessage( 'mainpagedocfooter' )->inContentLanguage()->text(),
+ '',
+ EDIT_NEW,
+ false,
+ User::newFromName( 'MediaWiki default' )
+ );
} catch (MWException $e) {
//using raw, because $wgShowExceptionDetails can not be set yet
$status->fatal( 'config-install-mainpage-failed', $e->getMessage() );
}
/**
- * Show an error message in a box. Parameters are like wfMsg().
+ * Show an error message in a box. Parameters are like wfMessage().
* @param $msg
*/
public function showError( $msg /*...*/ ) {
$s .= $this->getPageListItem( 'Restart', true, $currentPageName );
$s .= "</ul></div>\n"; // end list pane
$s .= Html::element( 'h2', array(),
- wfMsg( 'config-page-' . strtolower( $currentPageName ) ) );
+ wfMessage( 'config-page-' . strtolower( $currentPageName ) )->text() );
$this->output->addHTMLNoFlush( $s );
}
*/
private function getPageListItem( $pageName, $enabled, $currentPageName ) {
$s = "<li class=\"config-page-list-item\">";
- $name = wfMsg( 'config-page-' . strtolower( $pageName ) );
+ $name = wfMessage( 'config-page-' . strtolower( $pageName ) )->text();
if ( $enabled ) {
$query = array( 'page' => $pageName );
/**
* Get HTML for an error box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
*
* @return string
*/
/**
* Get HTML for a warning box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
*
* @return string
*/
/**
* Get HTML for an info box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
* @param $icon String: icon name, file in skins/common/images
* @param $class String: additional class name to add to the wrapper div
*
public function getInfoBox( $text, $icon = false, $class = false ) {
$text = $this->parse( $text, true );
$icon = ( $icon == false ) ? '../skins/common/images/info-32.png' : '../skins/common/images/'.$icon;
- $alt = wfMsg( 'config-information' );
+ $alt = wfMessage( 'config-information' )->text();
return Html::infoBox( $text, $icon, $alt, $class, false );
}
/**
* Get small text indented help for a preceding form field.
- * Parameters like wfMsg().
+ * Parameters like wfMessage().
*
* @param $msg
* @return string
$html = $this->parse( $text, true );
return "<div class=\"mw-help-field-container\">\n" .
- "<span class=\"mw-help-field-hint\">" . wfMsgHtml( 'config-help' ) . "</span>\n" .
+ "<span class=\"mw-help-field-hint\">" . wfMessage( 'config-help' )->escaped() .
+ "</span>\n" .
"<span class=\"mw-help-field-data\">" . $html . "</span>\n" .
"</div>\n";
}
/**
* Output a help box.
- * @param $msg String key for wfMsg()
+ * @param $msg String key for wfMessage()
*/
public function showHelpBox( $msg /*, ... */ ) {
$args = func_get_args();
if ( strval( $msg ) == '' ) {
$labelText = ' ';
} else {
- $labelText = wfMsgHtml( $msg );
+ $labelText = wfMessage( $msg )->escaped();
}
$attributes = array( 'class' => 'config-label' );
if( isset( $params['rawtext'] ) ) {
$labelText = $params['rawtext'];
} else {
- $labelText = $this->parse( wfMsg( $params['label'] ) );
+ $labelText = $this->parse( wfMessage( $params['label'] )->text() );
}
return
Xml::radio( $params['controlName'], $value, $checked, $itemAttribs ) .
' ' .
Xml::tags( 'label', array( 'for' => $id ), $this->parse(
- wfMsgNoTrans( $params['itemLabelPrefix'] . strtolower( $value ) )
+ wfMessage( $params['itemLabelPrefix'] . strtolower( $value ) )->plain()
) ) .
"</li>\n";
}
) );
$anchor = Html::rawElement( 'a',
array( 'href' => $this->getURL( array( 'localsettings' => 1 ) ) ),
- $img . ' ' . wfMsgHtml( 'config-download-localsettings' ) );
+ $img . ' ' . wfMessage( 'config-download-localsettings' )->escaped() );
return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor );
}
</div>
<div class="portal"><div class="body">
<?php
- echo $this->parent->parse( wfMsgNoTrans( 'config-sidebar' ), true );
+ echo $this->parent->parse( wfMessage( 'config-sidebar' )->plain(), true );
?>
</div></div>
</div>
public function outputTitle() {
global $wgVersion;
- echo htmlspecialchars( wfMsg( 'config-title', $wgVersion ) );
+ echo wfMessage( 'config-title', $wgVersion )->escaped();
}
public function getJQuery() {
if ( $continue ) {
// Fake submit button for enter keypress (bug 26267)
- $s .= Xml::submitButton( wfMsg( "config-$continue" ),
+ $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(),
array( 'name' => "enter-$continue", 'style' =>
'visibility:hidden;overflow:hidden;width:1px;margin:0' ) ) . "\n";
}
if ( $back ) {
- $s .= Xml::submitButton( wfMsg( "config-$back" ),
+ $s .= Xml::submitButton( wfMessage( "config-$back" )->text(),
array(
'name' => "submit-$back",
'tabindex' => $this->parent->nextTabIndex()
}
if ( $continue ) {
- $s .= Xml::submitButton( wfMsg( "config-$continue" ),
+ $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(),
array(
'name' => "submit-$continue",
'tabindex' => $this->parent->nextTabIndex(),
* @return string
*/
protected function getFieldsetStart( $legend ) {
- return "\n<fieldset><legend>" . wfMsgHtml( $legend ) . "</legend>\n";
+ return "\n<fieldset><legend>" . wfMessage( $legend )->escaped() . "</legend>\n";
}
/**
}
$this->startForm();
$this->addHTML( $this->parent->getInfoBox(
- wfMsgNoTrans( 'config-upgrade-key-missing',
- "<pre dir=\"ltr\">\$wgUpgradeKey = '" . $this->getVar( 'wgUpgradeKey' ) . "';</pre>" )
+ wfMessage( 'config-upgrade-key-missing', "<pre dir=\"ltr\">\$wgUpgradeKey = '" .
+ $this->getVar( 'wgUpgradeKey' ) . "';</pre>" )->plain()
) );
$this->endForm( 'continue' );
return 'output';
protected function showKeyForm() {
$this->startForm();
$this->addHTML(
- $this->parent->getInfoBox( wfMsgNoTrans( 'config-localsettings-upgrade' ) ).
+ $this->parent->getInfoBox( wfMessage( 'config-localsettings-upgrade' )->plain() ).
'<br />' .
$this->parent->getTextBox( array(
'var' => 'wgUpgradeKey',
return 'continue';
}
}
- $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
+ $this->parent->output->addWikiText( wfMessage( 'config-welcome' )->plain() );
$status = $this->parent->doEnvironmentChecks();
if ( $status->isGood() ) {
$this->parent->output->addHTML( '<span class="success-message">' .
- wfMsgHtml( 'config-env-good' ) . '</span>' );
- $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
- SpecialVersion::getCopyrightAndAuthorList() ) );
+ wfMessage( 'config-env-good' )->escaped() . '</span>' );
+ $this->parent->output->addWikiText( wfMessage( 'config-copyright',
+ SpecialVersion::getCopyrightAndAuthorList() )->plain() );
$this->startForm();
$this->endForm();
} else {
$dbSupport = '';
foreach( $this->parent->getDBTypes() as $type ) {
$link = DatabaseBase::factory( $type )->getSoftwareLink();
- $dbSupport .= wfMsgNoTrans( "config-support-$type", $link ) . "\n";
+ $dbSupport .= wfMessage( "config-support-$type", $link )->plain() . "\n";
}
$this->addHTML( $this->parent->getInfoBox(
- wfMsg( 'config-support-info', trim( $dbSupport ) ) ) );
+ wfMessage( 'config-support-info', trim( $dbSupport ) )->text() ) );
foreach ( $this->parent->getVar( '_CompiledDBs' ) as $type ) {
$installer = $this->parent->getDBInstaller( $type );
$settings .=
Html::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type,
'class' => 'dbWrapper' ) ) .
- Html::element( 'h3', array(), wfMsg( 'config-header-' . $type ) ) .
+ Html::element( 'h3', array(), wfMessage( 'config-header-' . $type )->text() ) .
$installer->getConnectForm() .
"</div>\n";
}
$this->startForm();
$this->addHTML( $this->parent->getInfoBox(
- wfMsgNoTrans( 'config-can-upgrade', $GLOBALS['wgVersion'] ) ) );
+ wfMessage( 'config-can-upgrade', $GLOBALS['wgVersion'] )->plain() ) );
$this->endForm();
}
$this->parent->disableLinkPopups();
$this->addHTML(
$this->parent->getInfoBox(
- wfMsgNoTrans( $msg,
+ wfMessage( $msg,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . '/index' .
$this->getVar( 'wgScriptExtension' )
- ), 'tick-32.png'
+ )->plain(), 'tick-32.png'
)
);
$this->parent->restoreLinkPopups();
// Set wgMetaNamespace to something valid before we show the form.
// $wgMetaNamespace defaults to $wgSiteName which is 'MediaWiki'
$metaNS = $this->getVar( 'wgMetaNamespace' );
- $this->setVar( 'wgMetaNamespace', wfMsgForContent( 'config-ns-other-default' ) );
+ $this->setVar(
+ 'wgMetaNamespace',
+ wfMessage( 'config-ns-other-default' )->inContentLanguage()->text()
+ );
$this->addHTML(
$this->parent->getTextBox( array(
'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
) ) .
$this->getFieldSetEnd() .
- $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
+ $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->text() ) .
$this->parent->getRadioSet( array(
'var' => '_SkipOptional',
'itemLabelPrefix' => 'config-optional-',
$name = preg_replace( '/__+/', '_', $name );
$name = ucfirst( trim( $name, '_' ) );
} elseif ( $nsType == 'generic' ) {
- $name = wfMsg( 'config-ns-generic' );
+ $name = wfMessage( 'config-ns-generic' )->text();
} else { // other
$name = $this->getVar( 'wgMetaNamespace' );
}
'itemLabelPrefix' => 'config-profile-',
'values' => array_keys( $this->parent->rightsProfiles ),
) ) .
- $this->parent->getInfoBox( wfMsgNoTrans( 'config-profile-help' ) ) .
+ $this->parent->getInfoBox( wfMessage( 'config-profile-help' )->plain() ) .
# Licensing
$this->parent->getRadioSet( array(
'href' => $this->getCCPartnerUrl(),
'onclick' => $expandJs,
),
- wfMsg( 'config-cc-again' )
+ wfMessage( 'config-cc-again' )->text()
) .
"</p>\n" .
"<script type=\"text/javascript\">\n" .
if ( isset( $entry['text'] ) ) {
$this->setVar( 'wgRightsText', $entry['text'] );
} else {
- $this->setVar( 'wgRightsText', wfMsg( 'config-license-' . $code ) );
+ $this->setVar( 'wgRightsText', wfMessage( 'config-license-' . $code )->text() );
}
$this->setVar( 'wgRightsUrl', $entry['url'] );
$this->setVar( 'wgRightsIcon', $entry['icon'] );
$this->endForm( $continue, $back );
} else {
$this->startForm();
- $this->addHTML( $this->parent->getInfoBox( wfMsgNoTrans( 'config-install-begin' ) ) );
+ $this->addHTML( $this->parent->getInfoBox( wfMessage( 'config-install-begin' )->plain() ) );
$this->endForm();
}
return true;
}
public function startStage( $step ) {
- $this->addHTML( "<li>" . wfMsgHtml( "config-install-$step" ) . wfMsg( 'ellipsis') );
+ $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis')->escaped() );
if ( $step == 'extension-tables' ) {
$this->startLiveBox();
}
$this->endLiveBox();
}
$msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed';
- $html = wfMsgHtml( 'word-separator' ) . wfMsgHtml( $msg );
+ $html = wfMessage( 'word-separator' )->escaped() . wfMessage( $msg )->escaped();
if ( !$status->isOk() ) {
$html = "<span class=\"error\">$html</span>";
}
$this->parent->disableLinkPopups();
$this->addHTML(
$this->parent->getInfoBox(
- wfMsgNoTrans( 'config-install-done',
+ wfMessage( 'config-install-done',
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . '/index' .
$this->getVar( 'wgScriptExtension' ),
'<downloadlink/>'
- ), 'tick-32.png'
+ )->plain(), 'tick-32.png'
)
);
$this->parent->restoreLinkPopups();
}
$this->startForm();
- $s = $this->parent->getWarningBox( wfMsgNoTrans( 'config-help-restart' ) );
+ $s = $this->parent->getWarningBox( wfMessage( 'config-help-restart' )->plain() );
$this->addHTML( $s );
$this->endForm( 'restart' );
}
public function getFileContents() {
$file = dirname( __FILE__ ) . '/../../' . $this->getFileName();
if( ! file_exists( $file ) ) {
- return wfMsgNoTrans( 'config-nofile', $file );
+ return wfMessage( 'config-nofile', $file )->plain();
}
return file_get_contents( $file );
}
if ( $this->params['leaveMessage'] ) {
$this->user->leaveUserMessage(
- wfMsg( 'upload-warning-subj' ),
- wfMsg( 'upload-warning-msg',
+ wfMessage( 'upload-warning-subj' )->text(),
+ wfMessage( 'upload-warning-msg',
$key,
- $this->params['url'] )
+ $this->params['url'] )->text()
);
} else {
wfSetupSession( $this->params['sessionId'] );
protected function leaveMessage( $status ) {
if ( $this->params['leaveMessage'] ) {
if ( $status->isGood() ) {
- $this->user->leaveUserMessage( wfMsg( 'upload-success-subj' ),
- wfMsg( 'upload-success-msg',
+ $this->user->leaveUserMessage( wfMessage( 'upload-success-subj' )->text(),
+ wfMessage( 'upload-success-msg',
$this->upload->getTitle()->getText(),
$this->params['url']
- ) );
+ )->text() );
} else {
- $this->user->leaveUserMessage( wfMsg( 'upload-failure-subj' ),
- wfMsg( 'upload-failure-msg',
+ $this->user->leaveUserMessage( wfMessage( 'upload-failure-subj' )->text(),
+ wfMessage( 'upload-failure-msg',
$status->getWikiText(),
$this->params['url']
- ) );
+ )->text() );
}
} else {
wfSetupSession( $this->params['sessionId'] );
$s .= '<td class="top" nowrap="nowrap">';
$s .= '<a href="' . htmlspecialchars( $mainPageObj->getLocalURL() ) . '">';
- $s .= '<span id="sitetitle">' . wfMsg( 'sitetitle' ) . '</span></a>';
+ $s .= '<span id="sitetitle">' . wfMessage( 'sitetitle' )->escaped() . '</span></a>';
$s .= '</td><td class="top" id="top-syslinks" width="100%">';
$s .= $this->sysLinks();
$s .= '</td></tr><tr><td class="top-subheader">';
$s .= '<font size="-1"><span id="sitesub">';
- $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>';
+ $s .= wfMessage( 'sitesubtitle' )->escaped() . '</span></font>';
$s .= '</td><td class="top-linkcollection">';
$s .= '<font size="-1"><span id="langlinks">';
$s .= $this->bottomLinks();
$s .= $this->getSkin()->getLanguage()->pipeList( array(
- "\n<br />" . Linker::link(
- Title::newMainPage(),
- null,
- array(),
- array(),
- array( 'known', 'noclasses' )
+ "\n<br />" . Linker::linkKnown(
+ Title::newMainPage()
),
$this->getSkin()->aboutLink(),
- $this->searchForm( wfMsg( 'qbfind' ) )
+ $this->searchForm( wfMessage( 'qbfind' )->text() )
) );
$s .= "\n<br />" . $this->pageStats();
$s = array(
$this->getSkin()->mainPageLink(),
Linker::linkKnown(
- Title::newFromText( wfMsgForContent( 'aboutpage' ) ),
- wfMsg( 'about' )
+ Title::newFromText( wfMessage( 'aboutpage' )->inContentLanguage()->text() ),
+ wfMessage( 'about' )->text()
),
Linker::linkKnown(
- Title::newFromText( wfMsgForContent( 'helppage' ) ),
- wfMsg( 'help' )
+ Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ),
+ wfMessage( 'help' )->text()
),
Linker::linkKnown(
- Title::newFromText( wfMsgForContent( 'faqpage' ) ),
- wfMsg( 'faq' )
+ Title::newFromText( wfMessage( 'faqpage' )->inContentLanguage()->text() ),
+ wfMessage( 'faq' )->text()
),
Linker::specialLink( 'Specialpages' )
);
if ( $this->data['loggedin'] ) {
$s[] = Linker::linkKnown(
$lo,
- wfMsg( 'logout' ),
+ wfMessage( 'logout' )->text(),
array(),
$q
);
} else {
$s[] = Linker::linkKnown(
$li,
- wfMsg( 'login' ),
+ wfMessage( 'login' )->text(),
array(),
$q
);
$s .= '<strong>' . $this->editThisPage() . '</strong>';
$s .= $sep . Linker::linkKnown(
- Title::newFromText( wfMsgForContent( 'edithelppage' ) ),
- wfMsg( 'edithelp' )
+ Title::newFromText( wfMessage( 'edithelppage' )->inContentLanguage()->text() ),
+ wfMessage( 'edithelp' )->text()
);
if( $this->data['loggedin'] ) {
if ( $this->data['loggedin'] ) {
$tl = Linker::link(
$user->getTalkPage(),
- wfMsg( 'mytalk' ),
+ wfMessage( 'mytalk' )->text(),
array(),
array(),
array( 'known', 'noclasses' )
$tl .= ' *';
}
- $s .= Linker::link(
+ $s .= Linker::linkKnown(
$user->getUserPage(),
- wfMsg( 'mypage' ),
- array(),
- array(),
- array( 'known', 'noclasses' )
+ wfMessage( 'mypage' )->text()
) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' )
. $sep .
- Linker::link(
+ Linker::linkKnown(
SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ),
- wfMsg( 'mycontris' ),
- array(),
- array(),
- array( 'known', 'noclasses' )
+ wfMessage( 'mycontris' )->text()
) . $sep . Linker::specialLink( 'Preferences' )
. $sep . Linker::specialLink( 'Userlogout' );
} else {
if( $wgSiteSupportPage ) {
$s .= $sep . '<a href="' . htmlspecialchars( $wgSiteSupportPage ) . '" class="internal">'
- . wfMsg( 'sitesupport' ) . '</a>';
+ . wfMessage( 'sitesupport' )->text() . '</a>';
}
- $s .= $sep . Linker::link(
+ $s .= $sep . Linker::linkKnown(
SpecialPage::getTitleFor( 'Specialpages' ),
- wfMsg( 'moredotdotdot' ),
- array(),
- array(),
- array( 'known', 'noclasses' )
+ wfMessage( 'moredotdotdot' )->text()
);
$s .= $sep . "\n</div>\n";
* @return string
*/
function menuHead( $key ) {
- $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
+ $s = "\n<h6>" . wfMessage( $key )->text() . "</h6>";
return $s;
}
$s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
. htmlspecialchars( substr( $search, 0, 256 ) ) . "\" /><br />"
- . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />";
+ . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
if( $wgUseTwoButtonsSearchForm ) {
- $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( 'search' ) ) . "\" />\n";
+ $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'search' )->escaped() . "\" />\n";
} else {
- $s .= '<div><a href="' . $action . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a></div>\n";
+ $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->text() . "</a></div>\n";
}
$s .= '</form>';
} else {
/* show user page and user talk links */
$user = $this->getSkin()->getUser();
- $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) );
- $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+ $s .= $sep . Linker::link( $user->getUserPage(), wfMessage( 'mypage' )->escaped() );
+ $s .= $sep . Linker::link( $user->getTalkPage(), wfMessage( 'mytalk' )->escaped() );
if ( $user->getNewtalk() ) {
$s .= ' *';
}
/* show my contributions link */
$s .= $sep . Linker::link(
SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ),
- wfMsgHtml( 'mycontris' ) );
+ wfMessage( 'mycontris' )->escaped() );
/* show my preferences link */
$s .= $sep . Linker::specialLink( 'Preferences' );
/* show upload file link */
$s.= Linker::specialLink( 'Watchlist' ) ;
$s .= $sep . Linker::linkKnown(
SpecialPage::getTitleFor( 'Contributions' ),
- wfMsg( 'mycontris' ),
+ wfMessage( 'mycontris' )->text(),
array(),
array( 'target' => $this->data['username'] )
);
case NS_TEMPLATE_TALK:
case NS_HELP_TALK:
case NS_CATEGORY_TALK:
- $text = wfMsg('viewtalkpage');
+ $text = wfMessage('viewtalkpage');
break;
case NS_MAIN:
- $text = wfMsg( 'articlepage' );
+ $text = wfMessage( 'articlepage' );
break;
case NS_USER:
- $text = wfMsg( 'userpage' );
+ $text = wfMessage( 'userpage' );
break;
case NS_PROJECT:
- $text = wfMsg( 'projectpage' );
+ $text = wfMessage( 'projectpage' );
break;
case NS_FILE:
- $text = wfMsg( 'imagepage' );
+ $text = wfMessage( 'imagepage' );
break;
case NS_MEDIAWIKI:
- $text = wfMsg( 'mediawikipage' );
+ $text = wfMessage( 'mediawikipage' );
break;
case NS_TEMPLATE:
- $text = wfMsg( 'templatepage' );
+ $text = wfMessage( 'templatepage' );
break;
case NS_HELP:
- $text = wfMsg( 'viewhelppage' );
+ $text = wfMessage( 'viewhelppage' );
break;
case NS_CATEGORY:
- $text = wfMsg( 'categorypage' );
+ $text = wfMessage( 'categorypage' );
break;
default:
- $text = wfMsg( 'articlepage' );
+ $text = wfMessage( 'articlepage' );
}
$link = $title->getText();
$link = $nstext . ':' . $link;
}
- $s .= Linker::link( Title::newFromText( $link ), $text );
+ $s .= Linker::link( Title::newFromText( $link ), $text->escaped() );
} elseif( $title->getNamespace() != NS_SPECIAL ) {
# we just throw in a "New page" text to tell the user that he's in edit mode,
# and to avoid messing with the separator that is prepended to the next item
- $s .= '<strong>' . wfMsg( 'newpage' ) . '</strong>';
+ $s .= '<strong>' . wfMessage( 'newpage' )->escaped() . '</strong>';
}
}
if( ( $title->isTalkPage() || $this->getSkin()->getOutput()->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
$s .= '<br />' . Linker::link(
$title,
- wfMsg( 'postcomment' ),
+ wfMessage( 'postcomment' )->escaped(),
array(),
array(
'action' => 'edit',
global $wgSiteSupportPage;
if( $wgSiteSupportPage ) {
$s .= "\n<br /><a href=\"" . htmlspecialchars( $wgSiteSupportPage ) .
- '" class="internal">' . wfMsg( 'sitesupport' ) . '</a>';
+ '" class="internal">' . wfMessage( 'sitesupport' )->escaped() . '</a>';
}
$s .= "\n<br /></div>\n";
wfProfileOut( __METHOD__ );
return $s;
}
-
}