r12189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12188‎ | r12189 | r12190 >
Date:05:15, 21 December 2005
Author:avar
Status:old
Tags:
Comment:
* Make User::isAllowed return true if passed an empty string
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -1118,6 +1118,10 @@
11191119 * @return boolean True: action is allowed, False: action should not be allowed
11201120 */
11211121 function isAllowed($action='') {
 1122+ if ( $action === '' )
 1123+ // In the spirit of DWIM
 1124+ return true;
 1125+
11221126 $this->loadFromDatabase();
11231127 return in_array( $action , $this->mRights );
11241128 }

Status & tagging log