Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -750,7 +750,9 @@ |
751 | 751 | # If $wgMessageCache isn't initialised yet, try to return something sensible. |
752 | 752 | if( is_object( $wgMessageCache ) ) { |
753 | 753 | $message = $wgMessageCache->get( $key, $useDB, $langCode ); |
754 | | - if ( $transform ) { |
| 754 | + if( $message === false ){ |
| 755 | + $message = '<' . htmlspecialchars( $key ) . '>'; |
| 756 | + } elseif ( $transform ) { |
755 | 757 | $message = $wgMessageCache->transform( $message ); |
756 | 758 | } |
757 | 759 | } else { |
— | — | @@ -2267,12 +2269,12 @@ |
2268 | 2270 | * looked up didn't exist but a XHTML string, this function checks for the |
2269 | 2271 | * nonexistance of messages by looking at wfMsg() output |
2270 | 2272 | * |
2271 | | - * @param $msg String: the message key looked up |
2272 | | - * @param $wfMsgOut String: the output of wfMsg*() |
2273 | | - * @return Boolean |
| 2273 | + * @param $key String: the message key looked up |
| 2274 | + * @return Boolean True if the message *doesn't* exist. |
2274 | 2275 | */ |
2275 | | -function wfEmptyMsg( $msg, $wfMsgOut ) { |
2276 | | - return $wfMsgOut === htmlspecialchars( "<$msg>" ); |
| 2276 | +function wfEmptyMsg( $key ) { |
| 2277 | + global $wgMessageCache; |
| 2278 | + return $wgMessageCache->get( $key ) === false; |
2277 | 2279 | } |
2278 | 2280 | |
2279 | 2281 | /** |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -500,7 +500,7 @@ |
501 | 501 | |
502 | 502 | if ( strval( $key ) === '' ) { |
503 | 503 | # Shortcut: the empty key is always missing |
504 | | - return '<>'; |
| 504 | + return false; |
505 | 505 | } |
506 | 506 | |
507 | 507 | $lang = wfGetLangObj( $langcode ); |
— | — | @@ -558,7 +558,7 @@ |
559 | 559 | |
560 | 560 | # Final fallback |
561 | 561 | if( $message === false ) { |
562 | | - return '<' . htmlspecialchars($key) . '>'; |
| 562 | + return false; |
563 | 563 | } |
564 | 564 | |
565 | 565 | # Fix whitespace |
Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -834,6 +834,11 @@ |
835 | 835 | |
836 | 836 | if ( strpos( $code, '/' ) === false ) { |
837 | 837 | $txt = $wgMessageCache->get( 'Conversiontable', true, $code ); |
| 838 | + if( $txt === false ){ |
| 839 | + # FIXME: this method doesn't seem to be expecting |
| 840 | + # this possible outcome... |
| 841 | + $txt = '<Conversiontable>'; |
| 842 | + } |
838 | 843 | } else { |
839 | 844 | $title = Title::makeTitleSafe( NS_MEDIAWIKI, |
840 | 845 | "Conversiontable/$code" ); |