(bug 10332) Title->userCan( 'edit' ) may return false positive
authorNick Jenkins <nickj@users.mediawiki.org>
Wed, 11 Jul 2007 08:43:21 +0000 (08:43 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Wed, 11 Jul 2007 08:43:21 +0000 (08:43 +0000)
(If this is not convenient for the userCan refactoring, then please revert this and reopen the bug)

RELEASE-NOTES
includes/Title.php

index 01ef77e..dd62f75 100644 (file)
@@ -276,6 +276,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 9903) Don't mark redirects in categories as stubs
 * (bug 6965) Cannot include "Template:R" with {{R}} (magic word conflict)
 * Padding parser functions now work with strings like '0' that evaluate to false
+* (bug 10332) Title->userCan( 'edit' ) may return false positive
 
 == API changes since 1.10 ==
 
index 2d29e07..fa02564 100644 (file)
@@ -1103,6 +1103,11 @@ class Title {
                        }
                }
 
+               if( $action == 'edit' && !$wgUser->isAllowed( 'edit' ) ) {
+                       wfProfileOut( $fname );
+                       return false;
+               }
+
                wfProfileOut( $fname );
                return true;
        }