* 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 ) {
* @return String
*/
protected function getDescription() {
- return wfMsgHtml( strtolower( $this->getName() ) );
+ return $this->msg( strtolower( $this->getName() ) )->escaped();
}
/**
/**
* @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 ) {
* 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 ) {