r60722 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60721‎ | r60722 | r60723 >
Date:10:37, 6 January 2010
Author:jojo
Status:resolved (Comments)
Tags:
Comment:
only add, when coll-bookscategory is set
Modified paths:
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.templates.php
@@ -178,7 +178,10 @@
179179 </form>
180180
181181 <?php
182 - $this->msgWiki('coll-save_category');
 182+ $t = wfMsgForContent('coll-bookscategory');
 183+ if ( $t && $t != '-') {
 184+ $this->msgWiki('coll-save_category');
 185+ }
183186 ?>
184187 </div>
185188 <?php } ?>

Comments

#Comment by 😂 (talk | contribs)   19:27, 6 January 2010

This won't do what you think it does. Checking return of wfMsgForContent() and making sure it's not disabled should be done as follows:

if( wfEmptyMsg( 'coll-bookscategory', $t ) || $t == '-' ) {
#Comment by Jbeigel (talk | contribs)   09:47, 7 January 2010

Thanks for the hint, fixed in r60787.

Status & tagging log