r95166 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95165‎ | r95166 | r95167 >
Date:18:23, 21 August 2011
Author:dantman
Status:ok
Tags:
Comment:
Remove the * {{msg}} syntax introduced to MediaWiki:Sidebar in r66974. This syntax is in the way of projects attempting to use a more flexible sidebar-like message parser, or fixing the dependence on MediaWiki:Sidebar for sidebar config. Eliminating it before people end up using it in production (from my tests it never actually worked in 1.17).
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1111,7 +1111,6 @@
11121112 */
11131113 function addToSidebarPlain( &$bar, $text ) {
11141114 $lines = explode( "\n", $text );
1115 - $wikiBar = array(); # We need to handle the wikitext on a different variable, to avoid trying to do an array operation on text, which would be a fatal error.
11161115
11171116 $heading = '';
11181117
@@ -1181,25 +1180,12 @@
11821181 'id' => 'n-' . Sanitizer::escapeId( strtr( $line[1], ' ', '-' ), 'noninitial' ),
11831182 'active' => false
11841183 ), $extraAttribs );
1185 - } elseif ( ( substr( $line, 0, 2 ) == '{{' ) && ( substr( $line, -2 ) == '}}' ) ) {
1186 - global $wgParser;
1187 -
1188 - $line = substr( $line, 2, strlen( $line ) - 4 );
1189 -
1190 - $options = new ParserOptions();
1191 - $options->setEditSection( false );
1192 - $options->setInterfaceMessage( true );
1193 - $wikiBar[$heading] = $wgParser->parse( wfMsgForContentNoTrans( $line ) , $this->getTitle(), $options )->getText();
11941184 } else {
11951185 continue;
11961186 }
11971187 }
11981188 }
11991189
1200 - if ( count( $wikiBar ) > 0 ) {
1201 - $bar = array_merge( $bar, $wikiBar );
1202 - }
1203 -
12041190 return $bar;
12051191 }
12061192

Follow-up revisions

RevisionCommit summaryAuthorDate
r95167Followup r95166, removing this from 1.18 before it is released and we can't r...dantman18:30, 21 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66974(Bug 21278) Allow wiki markup to the sidebarplatonides16:56, 27 May 2010

Status & tagging log