From b09caa9d1a1f5ff58ac49b494b582101f4163903 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 30 Sep 2005 15:03:48 +0000 Subject: [PATCH] * Removed function validActions(), no longer used by anything * Added a hook to isLogType() to be used by Newuserlog and Renameuser * FIXME comment --- includes/LogPage.php | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/includes/LogPage.php b/includes/LogPage.php index 5e35b50c5e..e9706b4f65 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -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 { -- 2.20.1