http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66836

Revision: 66836
Author:   platonides
Date:     2010-05-24 16:44:58 +0000 (Mon, 24 May 2010)

Log Message:
-----------
Merge r66835

Modified Paths:
--------------
    branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php
    branches/REL1_16/phase3/includes/Skin.php

Modified: branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php
===================================================================
--- branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php    
2010-05-24 16:38:08 UTC (rev 66835)
+++ branches/REL1_16/extensions/GroupsSidebar/GroupsSidebar.body.php    
2010-05-24 16:44:58 UTC (rev 66836)
@@ -11,7 +11,7 @@
                foreach ( $wgGroupsSidebar as $group => $sectiontitle ) {
                        if (in_array($group, $wgUser->getEffectiveGroups())) {
                                $message = 'sidebar-'.$sectiontitle;
-                               $skin->addToSidebar( &$bar, $message );
+                               $skin->addToSidebar( $bar, 
wfMsgForContentNoTrans( $message ) );
                        }
                }
                return true;

Modified: branches/REL1_16/phase3/includes/Skin.php
===================================================================
--- branches/REL1_16/phase3/includes/Skin.php   2010-05-24 16:38:08 UTC (rev 
66835)
+++ branches/REL1_16/phase3/includes/Skin.php   2010-05-24 16:44:58 UTC (rev 
66836)
@@ -2082,7 +2082,7 @@
                }
 
                $bar = array();
-               $this->addToSidebar( $bar, 'sidebar' );
+               $this->addToSidebar( $bar, wfMsgForContentNoTrans( 'sidebar' ) 
);
 
                wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) );
                if ( $wgEnableSidebarCache ) {
@@ -2091,15 +2091,17 @@
                wfProfileOut( __METHOD__ );
                return $bar;
        }
+       
        /**
-        * Add content from a sidebar system message
-        * Currently only used for MediaWiki:Sidebar (but may be used by 
Extensions)
-        *
+        * Add content to the sidebar from text
+        * @since 1.16
         * @param &$bar array
-        * @param $message String
+        * @param $text string
+        * 
+        * @return array
         */
-       function addToSidebar( &$bar, $message ) {
-               $lines = explode( "\n", wfMsgForContent( $message ) );
+       function addToSidebar( &$bar, $text ) {
+               $lines = explode( "\n", $text );
                $heading = '';
                foreach( $lines as $line ) {
                        if( strpos( $line, '*' ) !== 0 ) {



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to