* (bug 7252) Use dvipng support in texvc math rastrization. dvipng is required if texvc is rebuilt.
* (bug 7279) Use wfBaseName in place of basename() in more places
* Clear newtalk marker on diff links with explicit current revision number
+* (bug 7064) Replace hard-coded empty message checks with wfEmptyMsg calls
== Languages updated ==
function wfMsgWeirdKey ( $key ) {
$subsource = str_replace ( ' ' , '_' , $key ) ;
$source = wfMsgForContentNoTrans( $subsource ) ;
- if ( $source == "<{$subsource}>" ) {
+ if ( wfEmptyMsg( $subsource, $source) ) {
# Try again with first char lower case
$subsource = strtolower ( substr ( $subsource , 0 , 1 ) ) . substr ( $subsource , 1 ) ;
$source = wfMsgForContentNoTrans( $subsource ) ;
}
- if ( $source == "<{$subsource}>" ) {
+ if ( wfEmptyMsg( $subsource, $source ) ) {
# Didn't work either, return blank text
$source = "" ;
}
$needParse = false;
$notice = wfMsgForContent( $name );
- if( $notice == '<'. $name . ';>' || $notice == '-' ) {
+ if( wfEmptyMsg( $name, $notice ) || $notice == '-' ) {
wfProfileOut( $fname );
return( false );
}
$key = $this->mTitle->getDBkey();
$text = wfMsgForContentNoTrans( $key );
# If the message doesn't exist, return a blank
- if( $text == '<' . $key . '>' )
+ if( wfEmptyMsg( $key, $text ) )
$text = '';
$found = true;
} else {
}
$text = wfMsg( $message );
- if ( $text == "<$message>" ) {
+ if ( wfEmptyMsg( $message, $text ) ) {
global $wgContLang;
$text = $wgContLang->getFormattedNsText( Namespace::getSubject( $title->getNamespace() ) );
}
// by checking for default message content
$msgKey = ucfirst($this->skinname).'.js';
$userJS = wfMsgForContent($msgKey);
- if ('<'.$msgKey.'>' != $userJS) {
+ if ( !wfEmptyMsg( $msgKey, $userJS ) ) {
$s .= $userJS;
}
// $comment = '';
//}
continue;
- } elseif ($m['msg'] == '<'.$key.'>'){
+ } elseif ( wfEmptyMsg( $key, $m['msg'] ) ) {
$m['msg'] = '';
$comment = ' #empty';
} else {
*/
function makeLanguageSelector() {
$msg = wfMsgForContent( 'loginlanguagelinks' );
- if( $msg != '' && $msg != '<loginlanguagelinks>' ) {
+ if( $msg != '' && !wfEmptyMsg( 'loginlanguagelinks', $msg ) ) {
$langs = explode( "\n", $msg );
$links = array();
foreach( $langs as $lang ) {
static function getGroupName( $group ) {
$key = "group-$group";
$name = wfMsg( $key );
- if( $name == '' || $name == "<$key>" ) {
+ if( $name == '' || wfEmptyMsg( $key, $name ) ) {
return $group;
} else {
return $name;
static function getGroupMember( $group ) {
$key = "group-$group-member";
$name = wfMsg( $key );
- if( $name == '' || $name == "<$key>" ) {
+ if( $name == '' || wfEmptyMsg( $key, $name ) ) {
return $group;
} else {
return $name;