r87548 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87547‎ | r87548 | r87549 >
Date:16:40, 6 May 2011
Author:mah
Status:ok
Tags:
Comment:
Update per Reedy's mini-review on IRC:
* Make parens more spacey
* Use empty array instead of null for default.
Modified paths:
  • /trunk/extensions/RSS/RSSHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RSS/RSSHooks.php
@@ -22,9 +22,9 @@
2323 static function renderRss( $input, $args, $parser, $frame ) {
2424 global $wgRSSCacheAge, $wgRSSCacheCompare, $wgRSSNamespaces;
2525
26 - if ( $wgRSSNamespaces !== null && is_array($wgRSSNamespaces) ) {
 26+ if ( is_array( $wgRSSNamespaces ) && count( $wgRSSNamespaces ) ) {
2727 $ns = $parser->getTitle()->getNamespace();
28 - $checkNS = array_flip($wgRSSNamespaces);
 28+ $checkNS = array_flip( $wgRSSNamespaces );
2929
3030 if( !isset( $checkNS[$ns] ) ) {
3131 return wfMsg( 'rss-ns-permission' );

Status & tagging log