From: Ævar Arnfjörð Bjarmason Date: Fri, 22 Jul 2005 18:55:58 +0000 (+0000) Subject: * (bug 2774) Add three new $wgHooks to LogPage which enable extensions to add X-Git-Tag: 1.5.0beta4~64 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=fae689663f4ef3034a93b5c5e2ffbedea7a29a29;p=lhc%2Fweb%2Fwiklou.git * (bug 2774) Add three new $wgHooks to LogPage which enable extensions to add their own logtypes, see extensions/Renameuser/SpecialRenameuser.php for an example of this. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8e1a46d83c..5f2bfa9d64 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -591,6 +591,9 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * Fix notice on search index update due to non-array * (bug 2885) Fix fatal errors and notices in PHP 5.1.0beta3 * (bug 2931) Fix additional notices on reference use in PHP 4.4.0 +* (bug 2774) Add three new $wgHooks to LogPage which enable extensions to add + their own logtypes, see extensions/Renameuser/SpecialRenameuser.php for an + example of this. === Caveats === diff --git a/includes/LogPage.php b/includes/LogPage.php index ef0dce7928..4447dd76a0 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -89,6 +89,7 @@ class LogPage { */ function validTypes() { static $types = array( '', 'block', 'protect', 'rights', 'delete', 'upload', 'move' ); + wfRunHooks( 'LogPageValidTypes', array( &$types) ); return $types; } @@ -128,6 +129,8 @@ class LogPage { 'upload' => 'uploadlogpage', 'move' => 'movelogpage' ); + wfRunHooks( 'LogPageLogName', array( &$typeText) ); + return str_replace( '_', ' ', wfMsg( $typeText[$type] ) ); } @@ -144,6 +147,8 @@ class LogPage { 'upload' => 'uploadlogpagetext', 'move' => 'movelogpagetext' ); + wfRunHooks( 'LogPageLogHeader', array( &$headerText ) ); + return wfMsg( $headerText[$type] ); }