r60719 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60718‎ | r60719 | r60720 >
Date:10:03, 6 January 2010
Author:jojo
Status:ok
Tags:
Comment:
omit adding books category if sysmsg is empty
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -848,9 +848,12 @@
849849 //$articleText .= $item['revision'] . "/" . $item['latest']."\n";
850850 }
851851 }
852 - $catTitle = Title::makeTitle( NS_CATEGORY, wfMsgForContent( 'coll-bookscategory' ) );
853 - if ( !is_null( $catTitle ) ) {
854 - $articleText .= "\n[[" . $catTitle->getPrefixedText() . "|" . wfEscapeWikiText( $title->getSubpageText() ) . "]]\n";
 852+ $t = wfMsgForContent( 'coll-bookscategory' );
 853+ if ( $t && $t != '-' ) {
 854+ $catTitle = Title::makeTitle( NS_CATEGORY, $t );
 855+ if ( !is_null( $catTitle ) ) {
 856+ $articleText .= "\n[[" . $catTitle->getPrefixedText() . "|" . wfEscapeWikiText( $title->getSubpageText() ) . "]]\n";
 857+ }
855858 }
856859
857860 $req = new FauxRequest(array(

Status & tagging log