Update per Reedy's mini-review on IRC:

* Make parens more spacey
* Use empty array instead of null for default.
This commit is contained in:
Mark A. Hershberger 2011-05-06 16:40:14 +00:00
parent 518d4b7a17
commit e03eee9134

View file

@ -22,9 +22,9 @@ class RSSHooks {
static function renderRss( $input, $args, $parser, $frame ) {
global $wgRSSCacheAge, $wgRSSCacheCompare, $wgRSSNamespaces;
if ( $wgRSSNamespaces !== null && is_array($wgRSSNamespaces) ) {
if ( is_array( $wgRSSNamespaces ) && count( $wgRSSNamespaces ) ) {
$ns = $parser->getTitle()->getNamespace();
$checkNS = array_flip($wgRSSNamespaces);
$checkNS = array_flip( $wgRSSNamespaces );
if( !isset( $checkNS[$ns] ) ) {
return wfMsg( 'rss-ns-permission' );