From: Ævar Arnfjörð Bjarmason Date: Fri, 30 Sep 2005 15:03:48 +0000 (+0000) Subject: * Removed function validActions(), no longer used by anything X-Git-Tag: 1.6.0~1562 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=b09caa9d1a1f5ff58ac49b494b582101f4163903;p=lhc%2Fweb%2Fwiklou.git * Removed function validActions(), no longer used by anything * Added a hook to isLogType() to be used by Newuserlog and Renameuser * FIXME comment --- 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 {