X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FAction.php;h=ead8efaebf3d19478083e2a9933c8992d48e9232;hb=01bae7b7f169e80abf9993423f79d364805eae9c;hp=43f03c3a4f759f12aa8fc3aa4c389a8bd3c9f57a;hpb=67e70a2650ef1e90651c1478bf82270a9162ba66;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 43f03c3a4f..ead8efaebf 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -101,7 +101,7 @@ abstract class Action { } if ( is_callable( $classOrCallable ) ) { - return call_user_func_array( $classOrCallable, array( $page, $context ) ); + return call_user_func_array( $classOrCallable, [ $page, $context ] ); } return $classOrCallable; @@ -164,7 +164,7 @@ abstract class Action { * @return bool */ final public static function exists( $name ) { - return self::getClass( $name, array() ) !== null; + return self::getClass( $name, [] ) !== null; } /** @@ -252,7 +252,7 @@ abstract class Action { */ final public function msg() { $params = func_get_args(); - return call_user_func_array( array( $this->getContext(), 'msg' ), $params ); + return call_user_func_array( [ $this->getContext(), 'msg' ], $params ); } /** @@ -370,7 +370,7 @@ abstract class Action { * Returns the description that goes below the \ tag * @since 1.17 * - * @return string + * @return string HTML */ protected function getDescription() { return $this->msg( strtolower( $this->getName() ) )->escaped(); @@ -417,4 +417,13 @@ abstract class Action { wfTransactionalTimeLimit(); } } + + /** + * Indicates whether this action may perform database writes + * @return bool + * @since 1.27 + */ + public function doesWrites() { + return false; + } }