http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88815

Revision: 88815
Author:   ialex
Date:     2011-05-25 18:56:05 +0000 (Wed, 25 May 2011)
Log Message:
-----------
* Check existence in correct language
* Simplify a bit existence check

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialContributions.php
    trunk/phase3/languages/LanguageConverter.php

Modified: trunk/phase3/includes/specials/SpecialContributions.php
===================================================================
--- trunk/phase3/includes/specials/SpecialContributions.php     2011-05-25 
18:49:54 UTC (rev 88814)
+++ trunk/phase3/includes/specials/SpecialContributions.php     2011-05-25 
18:56:05 UTC (rev 88815)
@@ -403,8 +403,8 @@
                                Xml::dateMenu( $this->opts['year'], 
$this->opts['month'] ) . ' ' .
                                Xml::submitButton( wfMsg( 
'sp-contributions-submit' ) )
                        ) . ' ';
-               $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' 
);
-               if( !wfEmptyMsg( 'sp-contributions-explain' ) ) {
+               $explain = wfMessage( 'sp-contributions-explain' );
+               if ( $explain->exists() ) {
                        $f .= "<p 
id='mw-sp-contributions-explain'>{$explain}</p>";
                }
                $f .= Xml::closeElement('fieldset' ) .

Modified: trunk/phase3/languages/LanguageConverter.php
===================================================================
--- trunk/phase3/languages/LanguageConverter.php        2011-05-25 18:49:54 UTC 
(rev 88814)
+++ trunk/phase3/languages/LanguageConverter.php        2011-05-25 18:56:05 UTC 
(rev 88815)
@@ -531,9 +531,9 @@
                        $text = '';
                } else {
                        // first let's check if a message has given us a 
converted name
-                       $nsConvKey = 'conversion-ns' . $index;
-                       if ( !wfEmptyMsg( $nsConvKey ) ) {
-                               $text = wfMsgForContentNoTrans( $nsConvKey );
+                       $nsConvMsg = wfMessage( 'conversion-ns' . $index 
)->inContentLanguage();
+                       if ( $nsConvMsg->exists() ) {
+                               $text = $nsConvMsg->plain();
                        } else {
                                // the message does not exist, try retrieve it 
from the current
                                // variant's namespace names.


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to