+ return wfMsg( $headerText[$type] );
+ }
+
+ /**
+ * @static
+ */
+ function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) {
+ global $wgLang;
+ static $actions = array(
+ 'block/block' => 'blocklogentry',
+ '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',
+ 'upload/revert' => 'uploadedimage',
+ 'move/move' => '1movedto2',
+ 'move/move_redir' => '1movedto2_redir'
+ );
+ wfRunHooks( 'LogPageActionText', array( &$actions ) );
+
+ $key = "$type/$action";
+ if( isset( $actions[$key] ) ) {
+ if( is_null( $title ) ) {
+ $rv=wfMsg( $actions[$key] );
+ } else {
+ if( $skin ) {
+ if ( $type == 'move' ) {
+ $titleLink = $skin->makeLinkObj( $title, $title->getPrefixedText(), 'redirect=no' );
+ // Change $param[0] into a link to the title specified in $param[0]
+ $movedTo = Title::newFromText( $params[0] );
+ $params[0] = $skin->makeLinkObj( $movedTo, $params[0] );
+ } else {
+ $titleLink = $skin->makeLinkObj( $title );
+ }
+ } else {
+ $titleLink = $title->getPrefixedText();
+ }
+ if( count( $params ) == 0 ) {
+ $rv = wfMsg( $actions[$key], $titleLink );
+ } else {
+ array_unshift( $params, $titleLink );
+ if ( $translate && $key == 'block/block' ) {
+ $params[1] = $wgLang->translateBlockExpiry($params[1]);
+ }
+ $rv = wfMsgReal( $actions[$key], $params, true, false ); // FIXME: use wfMsgForContent() ?
+ }
+ }