From: Roan Kattouw Date: Thu, 25 Feb 2010 15:58:29 +0000 (+0000) Subject: Rename Skin::addToSidebar() to Skin::addToSidebarPlain() and have it take plain text... X-Git-Tag: 1.31.0-rc.0~37611 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=7becf3c16ac64e441c5068d7cca6fbdc96399b54;p=lhc%2Fweb%2Fwiklou.git Rename Skin::addToSidebar() to Skin::addToSidebarPlain() and have it take plain text instead of a message key so it's actually useful to extensions that want to modify the sidebar in a non-message-based way (like DynamicSidebar). Kept addToSidebar() as a wrapper for backwards compatibility --- diff --git a/includes/Skin.php b/includes/Skin.php index d1a0016dce..e13dd0865b 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -2095,11 +2095,22 @@ CSS; * Add content from a sidebar system message * Currently only used for MediaWiki:Sidebar (but may be used by Extensions) * + * This is just a wrapper around addToSidebarPlain() for backwards compatibility + * * @param &$bar array * @param $message String */ function addToSidebar( &$bar, $message ) { - $lines = explode( "\n", wfMsgForContent( $message ) ); + $this->addToSidebarPlain( $bar, wfMsgForContent( $message ) ); + } + + /** + * Add content from plain text + * @param &$bar array + * @param $text string + */ + function addToSidebarPlain( &$bar, $text ) { + $lines = explode( "\n", $text ); $heading = ''; foreach( $lines as $line ) { if( strpos( $line, '*' ) !== 0 ) {