mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RSS
synced 2024-11-15 03:34:37 +00:00
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:
parent
518d4b7a17
commit
e03eee9134
|
@ -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' );
|
||||
|
|
Loading…
Reference in a new issue