Index: branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | foreach ( $wgGroupsSidebar as $group => $sectiontitle ) { |
13 | 13 | if (in_array($group, $wgUser->getEffectiveGroups())) { |
14 | 14 | $message = 'sidebar-'.$sectiontitle; |
15 | | - $skin->addToSidebar( $bar, wfMsgForContentNoTrans( $message ) ); |
| 15 | + $skin->addToSidebar( &$bar, $message ); |
16 | 16 | } |
17 | 17 | } |
18 | 18 | return true; |
Index: branches/REL1_16/phase3/includes/Skin.php |
— | — | @@ -2082,7 +2082,7 @@ |
2083 | 2083 | } |
2084 | 2084 | |
2085 | 2085 | $bar = array(); |
2086 | | - $this->addToSidebar( $bar, wfMsgForContentNoTrans( 'sidebar' ) ); |
| 2086 | + $this->addToSidebar( $bar, 'sidebar' ); |
2087 | 2087 | |
2088 | 2088 | wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) ); |
2089 | 2089 | if ( $wgEnableSidebarCache ) { |
— | — | @@ -2091,17 +2091,15 @@ |
2092 | 2092 | wfProfileOut( __METHOD__ ); |
2093 | 2093 | return $bar; |
2094 | 2094 | } |
2095 | | - |
2096 | 2095 | /** |
2097 | | - * Add content to the sidebar from text |
2098 | | - * @since 1.16 |
| 2096 | + * Add content from a sidebar system message |
| 2097 | + * Currently only used for MediaWiki:Sidebar (but may be used by Extensions) |
| 2098 | + * |
2099 | 2099 | * @param &$bar array |
2100 | | - * @param $text string |
2101 | | - * |
2102 | | - * @return array |
| 2100 | + * @param $message String |
2103 | 2101 | */ |
2104 | | - function addToSidebar( &$bar, $text ) { |
2105 | | - $lines = explode( "\n", $text ); |
| 2102 | + function addToSidebar( &$bar, $message ) { |
| 2103 | + $lines = explode( "\n", wfMsgForContent( $message ) ); |
2106 | 2104 | $heading = ''; |
2107 | 2105 | foreach( $lines as $line ) { |
2108 | 2106 | if( strpos( $line, '*' ) !== 0 ) { |
— | — | @@ -2114,9 +2112,6 @@ |
2115 | 2113 | } |
2116 | 2114 | } else { |
2117 | 2115 | if( strpos( $line, '|' ) !== false ) { // sanity check |
2118 | | - global $wgMessageCache; |
2119 | | - $line = $wgMessageCache->transform( $line ); |
2120 | | - |
2121 | 2116 | $line = array_map( 'trim', explode( '|', trim( $line, '* ' ), 2 ) ); |
2122 | 2117 | $link = wfMsgForContent( $line[0] ); |
2123 | 2118 | if( $link == '-' ) { |