aboutsummaryrefslogtreecommitdiffstats
path: root/includes/specials/SpecialLockdb.php
diff options
context:
space:
mode:
authorAaron Schulz <aaron@users.mediawiki.org>2011-10-26 06:22:25 +0000
committerAaron Schulz <aaron@users.mediawiki.org>2011-10-26 06:22:25 +0000
commit44ff769519fb945f31e6674e80b395cbe37617fb (patch)
tree5d82500e61116ec910f97b58be538149ceb077fe /includes/specials/SpecialLockdb.php
parent976c6abcfc752e6b2177b30bf540bf858c7d85d8 (diff)
downloadmediawikicore-44ff769519fb945f31e6674e80b395cbe37617fb.tar.gz
mediawikicore-44ff769519fb945f31e6674e80b395cbe37617fb.zip
Split out checkExecutePermissions() function from userCanExecute() in FormSpecialPage. The former handles actual execute() calls and throws exceptions, the later inherits its purpose from SpecialPage. It just checks the page restriction to see if a user generally *could* execute. This avoids the breakage that came up in r100723 where Special:SpecialPages was throwing permission errors due to the getUsablePages() call.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100795
Diffstat (limited to 'includes/specials/SpecialLockdb.php')
-rw-r--r--includes/specials/SpecialLockdb.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php
index 9dec018e34e0..53fddc4f10be 100644
--- a/includes/specials/SpecialLockdb.php
+++ b/includes/specials/SpecialLockdb.php
@@ -37,11 +37,11 @@ class SpecialLockdb extends FormSpecialPage {
return false;
}
- public function userCanExecute( User $user ) {
- parent::userCanExecute( $user );
+ public function checkExecutePermissions( User $user ) {
+ global $wgReadOnlyFile;
+ parent::checkExecutePermissions( $user );
# If the lock file isn't writable, we can do sweet bugger all
- global $wgReadOnlyFile;
if ( !is_writable( dirname( $wgReadOnlyFile ) ) ) {
throw new ErrorPageError( 'lockdb', 'lockfilenotwritable' );
}