* Removed function validActions(), no longer used by anything
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 30 Sep 2005 15:03:48 +0000 (15:03 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 30 Sep 2005 15:03:48 +0000 (15:03 +0000)
* Added a hook to isLogType() to be used by Newuserlog and Renameuser
* FIXME comment

includes/LogPage.php

index 5e35b50..e9706b4 100644 (file)
@@ -97,22 +97,6 @@ class LogPage {
                return $types;
        }
 
-       /**
-        * @static
-        */
-       function validActions( $type ) {
-               static $actions = array(
-                       '' => NULL,
-                       'block' => array( 'block', 'unblock' ),
-                       'protect' => array( 'protect', 'unprotect' ),
-                       'rights' => array( 'rights' ),
-                       'delete' => array( 'delete', 'restore' ),
-                       'upload' => array( 'upload' ),
-                       'move' => array( 'move' )
-               );
-               return $actions[$type];
-       }
-
        /**
         * @static
         */
@@ -177,6 +161,8 @@ class LogPage {
                        'move/move'         => '1movedto2',
                        'move/move_redir'   => '1movedto2_redir'
                );
+               wfRunHooks( 'LogPageActionText', array( &$actions ) );
+
                $key = "$type/$action";
                if( isset( $actions[$key] ) ) {
                        if( is_null( $title ) ) {
@@ -201,7 +187,7 @@ class LogPage {
                                        if ( $translate && $key == 'block/block' ) {
                                                $params[1] = $wgLang->translateBlockExpiry($params[1]);
                                        }
-                                       $rv = wfMsgReal( $actions[$key], $params, true, false );
+                                       $rv = wfMsgReal( $actions[$key], $params, true, false ); // FIXME: use wfMsgForContent() ?
                                }
                        }
                } else {