Merge "MimeAnalyzer: Add testcases for mp3 detection"
[lhc/web/wiklou.git] / includes / actions / Action.php
index f06f828..e8d9a3e 100644 (file)
@@ -34,7 +34,7 @@
  * format (protect, delete, move, etc), and the just-do-something format (watch, rollback,
  * patrol, etc). The FormAction and FormlessAction classes represent these two groups.
  */
-abstract class Action {
+abstract class Action implements MessageLocalizer {
 
        /**
         * Page on which we're performing the action
@@ -151,7 +151,7 @@ abstract class Action {
                        return 'view';
                }
 
-               $action = Action::factory( $actionName, $context->getWikiPage(), $context );
+               $action = self::factory( $actionName, $context->getWikiPage(), $context );
                if ( $action instanceof Action ) {
                        return $action->getName();
                }
@@ -253,14 +253,12 @@ abstract class Action {
         *
         * @return Message
         */
-       final public function msg() {
+       final public function msg( $key ) {
                $params = func_get_args();
                return call_user_func_array( [ $this->getContext(), 'msg' ], $params );
        }
 
        /**
-        * Constructor.
-        *
         * Only public since 1.21
         *
         * @param Page $page
@@ -390,7 +388,7 @@ abstract class Action {
        public function addHelpLink( $to, $overrideBaseUrl = false ) {
                global $wgContLang;
                $msg = wfMessage( $wgContLang->lc(
-                       Action::getActionName( $this->getContext() )
+                       self::getActionName( $this->getContext() )
                        ) . '-helppage' );
 
                if ( !$msg->isDisabled() ) {