Merge "Action::checkCanExecute doesn't return anything on success, but WatchAction...
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 7 Apr 2012 23:58:27 +0000 (23:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 7 Apr 2012 23:58:27 +0000 (23:58 +0000)
includes/Action.php

index 84c0f80..a25e8aa 100644 (file)
@@ -266,6 +266,7 @@ abstract class Action {
         *
         * @param $user User: the user to check, or null to use the context user
         * @throws ErrorPageError
+        * @return bool True on success
         */
        protected function checkCanExecute( User $user ) {
                $right = $this->getRestriction();
@@ -287,6 +288,7 @@ abstract class Action {
                if ( $this->requiresWrite() && wfReadOnly() ) {
                        throw new ReadOnlyError();
                }
+               return true;
        }
 
        /**