Revision: 50128 Author: aaron Date: 2009-05-02 13:42:51 +0000 (Sat, 02 May 2009)
Log Message: ----------- Fixed total log breakage due to type safety issues Modified Paths: -------------- trunk/phase3/includes/LogEventsList.php Modified: trunk/phase3/includes/LogEventsList.php =================================================================== --- trunk/phase3/includes/LogEventsList.php 2009-05-02 13:39:48 UTC (rev 50127) +++ trunk/phase3/includes/LogEventsList.php 2009-05-02 13:42:51 UTC (rev 50128) @@ -546,7 +546,7 @@ private function limitType( $types ) { global $wgLogRestrictions, $wgUser; // If $types is not an array, make it an array - $types = (array)$types; + $types = ($types === '') ? array() : (array)$types; // Don't even show header for private logs; don't recognize it... foreach ( $types as $type ) { if( isset( $wgLogRestrictions[$type] ) && !$wgUser->isAllowed($wgLogRestrictions[$type]) ) { @@ -560,7 +560,7 @@ if( $hideLogs !== false ) { $this->mConds[] = $hideLogs; } - if( $types ) { + if( count($types) > 0 ) { $this->type = $types; $this->mConds['log_type'] = $types; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs