Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -575,10 +575,13 @@ |
576 | 576 | * @param $conds Array Extra conditions for the query |
577 | 577 | * @param $showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty |
578 | 578 | * if set to true (default), "No matching items in log" is displayed if loglist is empty |
579 | | - * @param $msgKey String if you want a nice box with a message, set this to the key of the message |
| 579 | + * @param $msgKey Array If you want a nice box with a message, set this |
| 580 | + * to the key of the message. First element is the message |
| 581 | + * key, additional optional elements are parameters for the |
| 582 | + * key that are processed with wgMsgExt and option 'parse' |
580 | 583 | * @return Integer Number of total log items (not limited by $lim) |
581 | 584 | */ |
582 | | - public static function showLogExtract( &$out, $types=array(), $page='', $user='', $lim=0, $conds=array(), $showIfEmpty = true, $msgKey = '' ) { |
| 585 | + public static function showLogExtract( &$out, $types=array(), $page='', $user='', $lim=0, $conds=array(), $showIfEmpty = true, $msgKey = array() ) { |
583 | 586 | global $wgUser, $wgOut; |
584 | 587 | # Insert list of top 50 or so items |
585 | 588 | $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); |
— | — | @@ -587,8 +590,17 @@ |
588 | 591 | $logBody = $pager->getBody(); |
589 | 592 | $s = ''; |
590 | 593 | if( $logBody ) { |
591 | | - if ( $msgKey ) |
592 | | - $s = '<div class="mw-warning-with-logexcerpt">' . wfMsgExt( $msgKey, array('parse') ) ; |
| 594 | + if ( $msgKey ) { |
| 595 | + $s = '<div class="mw-warning-with-logexcerpt">'; |
| 596 | + |
| 597 | + if ( sizeof( $msgKey ) == 1 ) { |
| 598 | + $s .= wfMsgExt( $msgKey[0], array('parse') ); |
| 599 | + } else { // Process additional arguments |
| 600 | + $args = $msgKey; |
| 601 | + unset( $args[0] ); |
| 602 | + $s .= wfMsgExt( $msgKey[0], array('parse'), $args ); |
| 603 | + } |
| 604 | + } |
593 | 605 | $s .= $loglist->beginLogEventsList() . |
594 | 606 | $logBody . |
595 | 607 | $loglist->endLogEventsList(); |
Index: trunk/extensions/Renameuser/SpecialRenameuser.i18n.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | 'right-renameuser' => 'Rename users', |
44 | 44 | |
45 | 45 | 'renameuser-renamed-notice' => 'This user has been renamed. |
46 | | -The rename log is provided below for reference.', |
| 46 | +The rename log is provided below for reference.', # Supports GENDER |
47 | 47 | ); |
48 | 48 | |
49 | 49 | /** Message documentation (Message documentation) |
— | — | @@ -58,6 +58,7 @@ |
59 | 59 | * Parameter $1 is the original username |
60 | 60 | * Parameter $2 is the new username', |
61 | 61 | 'right-renameuser' => '{{doc-right}}', |
| 62 | + 'renameuser-renamed-notice' => 'This message supports the use of GENDER.', |
62 | 63 | ); |
63 | 64 | |
64 | 65 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/Renameuser/SpecialRenameuser.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | if( !$title || $title->getNamespace() !== NS_USER ) { |
49 | 49 | $rv = ''; // handled in comment, the old way |
50 | 50 | } else { |
51 | | - $titleLink = $skin ? |
| 51 | + $titleLink = $skin ? |
52 | 52 | $skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ) ) : $title->getText(); |
53 | 53 | # Add title to params |
54 | 54 | array_unshift( $params, $titleLink ); |
— | — | @@ -70,8 +70,7 @@ |
71 | 71 | if ( $title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) { |
72 | 72 | // Get the title for the base userpage |
73 | 73 | $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) )->getPrefixedDBkey(); |
74 | | - LogEventsList::showLogExtract( $wgOut, 'renameuser', $page, '', 10, array(), false, 'renameuser-renamed-notice' ); |
| 74 | + LogEventsList::showLogExtract( $wgOut, 'renameuser', $page, '', 10, array(), false, array( 'renameuser-renamed-notice', $title->getBaseText() ) ); |
75 | 75 | } |
76 | 76 | return true; |
77 | 77 | } |
78 | | - |