* Implemented a cache for User::getMaxID()
[lhc/web/wiklou.git] / includes / LogPage.php
index 5e35b50..6d28ba3 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
         */
@@ -166,10 +150,13 @@ class LogPage {
                        'block/unblock'     => 'unblocklogentry',
                        'protect/protect'   => 'protectedarticle',
                        'protect/unprotect' => 'unprotectedarticle',
+                       
+                       // TODO: This whole section should be moved to extensions/Makesysop/SpecialMakesysop.php
                        'rights/rights'     => 'bureaucratlogentry',
                        'rights/addgroup'   => 'addgrouplogentry',
                        'rights/rngroup'    => 'renamegrouplogentry',
                        'rights/chgroup'    => 'changegrouplogentry',
+                       
                        'delete/delete'     => 'deletedarticle',
                        'delete/restore'    => 'undeletedarticle',
                        'upload/upload'     => 'uploadedimage',
@@ -177,6 +164,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 +190,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 {