X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAction.php;h=82017632d4a1cc2405d39e9d236f4837399c18d9;hb=6d5c59d905349fe960b7dac8f95332f0f56ba0a2;hp=f4343d16a235f12926d26bf958a59fac45037577;hpb=1690388847edcdcb070427365751745f9706dd82;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Action.php b/includes/Action.php index f4343d16a2..82017632d4 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -272,7 +272,7 @@ abstract class Action { * must throw subclasses of ErrorPageError * * @param $user User: the user to check, or null to use the context user - * @throws ErrorPageError + * @throws UserBlockedError|ReadOnlyError|PermissionsError * @return bool True on success */ protected function checkCanExecute( User $user ) { @@ -341,7 +341,7 @@ abstract class Action { * @return String */ protected function getDescription() { - return wfMsgHtml( strtolower( $this->getName() ) ); + return $this->msg( strtolower( $this->getName() ) )->escaped(); } /** @@ -455,9 +455,10 @@ abstract class FormAction extends Action { /** * @see Action::execute() - * @throws ErrorPageError + * * @param $data array|null * @param $captureErrors bool + * @throws ErrorPageError|Exception * @return bool */ public function execute( array $data = null, $captureErrors = true ) { @@ -546,6 +547,7 @@ abstract class FormlessAction extends Action { * forms, they probably won't have any data, but some (eg rollback) may do * @param $data Array values that would normally be in the GET request * @param $captureErrors Bool whether to catch exceptions and just return false + * @throws ErrorPageError|Exception * @return Bool whether execution was successful */ public function execute( array $data = null, $captureErrors = true ) {