r68708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68707‎ | r68708 | r68709 >
Date:06:43, 29 June 2010
Author:tstarling
Status:deferred
Tags:
Comment:
Revert r66836, r66846 (equivalent to MFT r68707): it's too late to break interfaces in 1.16.
Modified paths:
  • /branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php (modified) (history)
  • /branches/REL1_16/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php
@@ -11,7 +11,7 @@
1212 foreach ( $wgGroupsSidebar as $group => $sectiontitle ) {
1313 if (in_array($group, $wgUser->getEffectiveGroups())) {
1414 $message = 'sidebar-'.$sectiontitle;
15 - $skin->addToSidebar( $bar, wfMsgForContentNoTrans( $message ) );
 15+ $skin->addToSidebar( &$bar, $message );
1616 }
1717 }
1818 return true;
Index: branches/REL1_16/phase3/includes/Skin.php
@@ -2082,7 +2082,7 @@
20832083 }
20842084
20852085 $bar = array();
2086 - $this->addToSidebar( $bar, wfMsgForContentNoTrans( 'sidebar' ) );
 2086+ $this->addToSidebar( $bar, 'sidebar' );
20872087
20882088 wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) );
20892089 if ( $wgEnableSidebarCache ) {
@@ -2091,17 +2091,15 @@
20922092 wfProfileOut( __METHOD__ );
20932093 return $bar;
20942094 }
2095 -
20962095 /**
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+ *
20992099 * @param &$bar array
2100 - * @param $text string
2101 - *
2102 - * @return array
 2100+ * @param $message String
21032101 */
2104 - function addToSidebar( &$bar, $text ) {
2105 - $lines = explode( "\n", $text );
 2102+ function addToSidebar( &$bar, $message ) {
 2103+ $lines = explode( "\n", wfMsgForContent( $message ) );
21062104 $heading = '';
21072105 foreach( $lines as $line ) {
21082106 if( strpos( $line, '*' ) !== 0 ) {
@@ -2114,9 +2112,6 @@
21152113 }
21162114 } else {
21172115 if( strpos( $line, '|' ) !== false ) { // sanity check
2118 - global $wgMessageCache;
2119 - $line = $wgMessageCache->transform( $line );
2120 -
21212116 $line = array_map( 'trim', explode( '|', trim( $line, '* ' ), 2 ) );
21222117 $link = wfMsgForContent( $line[0] );
21232118 if( $link == '-' ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66836Merge r66835platonides16:44, 24 May 2010
r66846Follow up r66835. Some people use direct urls in MediaWiki:Sidebar instead of...platonides20:01, 24 May 2010
r68707Revert r66835, r66846: it's too late to break interfaces in 1.16.tstarling06:39, 29 June 2010

Status & tagging log