r60787 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60786‎ | r60787 | r60788 >
Date:09:45, 7 January 2010
Author:jojo
Status:ok
Tags:
Comment:
fix checks for empty sysmsgs
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -849,7 +849,7 @@
850850 }
851851 }
852852 $t = wfMsgForContent( 'coll-bookscategory' );
853 - if ( $t && $t != '-' ) {
 853+ if ( !wfEmptyMsg( 'coll-bookscategory', $t ) && $t != '-' ) {
854854 $catTitle = Title::makeTitle( NS_CATEGORY, $t );
855855 if ( !is_null( $catTitle ) ) {
856856 $articleText .= "\n[[" . $catTitle->getPrefixedText() . "|" . wfEscapeWikiText( $title->getSubpageText() ) . "]]\n";
@@ -882,7 +882,7 @@
883883 );
884884
885885 $from_msg = wfMsgForContent( 'coll-license_url' );
886 - if ( $from_msg && $from_msg != '-' ) {
 886+ if ( !wfEmptyMsg( 'coll-license_url', $from_msg ) && $from_msg != '-' ) {
887887 $licenseInfo['mw_license_url'] = $from_msg;
888888 return array( $licenseInfo );
889889 }
Index: trunk/extensions/Collection/Collection.templates.php
@@ -179,7 +179,7 @@
180180
181181 <?php
182182 $t = wfMsgForContent('coll-bookscategory');
183 - if ( $t && $t != '-') {
 183+ if ( !wfEmtpyMsg('coll-bookscategory', $t) && $t != '-') {
184184 $this->msgWiki('coll-save_category');
185185 }
186186 ?>

Status & tagging log