* Fixed one check in Skin::addToSidebarPlain() that used user language for existence and content language for message's content
* Changed SkinTemplate::buildContentNavigationUrls() to use Title::getDefaultMessageText() instead of wfEmptyMsg()
if ( strpos( $line, '|' ) !== false ) { // sanity check
$line = MessageCache::singleton()->transform( $line, false, null, $this->getTitle() );
$line = array_map( 'trim', explode( '|', $line, 2 ) );
- $link = wfMsgForContent( $line[0] );
- if ( $link == '-' ) {
- continue;
+ $msgLink = wfMessage( $line[0] )->inContentLanguage();
+ if ( $msgLink->exists() ) {
+ $link = $msgLink->text();
+ if ( $link == '-' ) {
+ continue;
+ }
+ } else {
+ $link = $line[0];
}
- $text = wfMsgExt( $line[1], 'parsemag' );
-
- if ( wfEmptyMsg( $line[1] ) ) {
+ $msgText = wfMessage( $line[1] );
+ if ( $msgText->exists() ) {
+ $text = $msgText->text();
+ } else {
$text = $line[1];
}
- if ( wfEmptyMsg( $line[0] ) ) {
- $link = $line[0];
- }
-
if ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $link ) ) {
$href = $link;
} else {
( $action == 'edit' || $action == 'submit' ) &&
( $section != 'new' )
);
- $msgKey = $title->exists() || ( $title->getNamespace() == NS_MEDIAWIKI && !wfEmptyMsg( $title->getText() ) ) ?
+ $msgKey = $title->exists() || ( $title->getNamespace() == NS_MEDIAWIKI && $title->getDefaultMessageText() !== false ) ?
"edit" : "create";
$content_navigation['views']['edit'] = array(
'class' => ( $selected ? 'selected' : '' ) . $isTalkClass,
$barnumber = 1;
foreach ( $bar as $heading => $browseLinks ) {
- $heading_text = wfMsg ( $heading );
if ( $barnumber > 1 ) {
- if ( wfEmptyMsg( $heading, $heading_text ) ) {
- $h = $heading;
+ $headingMsg = wfMessage( $heading );
+ if ( $headingMsg->exists() ) {
+ $h = $headingMsg->text();
} else {
- $h = $heading_text;
+ $h = $heading;
}
$s .= "\n<h6>" . htmlspecialchars( $h ) . "</h6>";
}
htmlspecialchars( $link['text'] ) . '</a>' . $sep;
}
}
- $barnumber = $barnumber + 1;
+ $barnumber++;
}
if ( $wgOut->isArticle() ) {
echo ' ' . Html::openElement( 'div', $portletAttribs );
?>
- <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
+ <h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
}
?>
<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
- <h5<?php $this->html( 'userlangattributes' ) ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
+ <h5<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h5>
<div class="body">
<?php
if ( is_array( $content ) ): ?>