r51062 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51061‎ | r51062 | r51063 >
Date:14:20, 27 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
Let '\n' represent newlines in #arraymap and #arraymaptemplate's 'new delimiter' argument as well
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -176,6 +176,7 @@
177177 // let '\n' represent newlines - chances that anyone will
178178 // actually need the '\n' literal are small
179179 $delimiter = str_replace('\n', "\n", $delimiter);
 180+ $new_delimiter = str_replace('\n', "\n", $new_delimiter);
180181 $values_array = explode($parser->mStripState->unstripNoWiki($delimiter), $value);
181182 $results = array();
182183 foreach ($values_array as $cur_value) {
@@ -204,6 +205,7 @@
205206 $delimiter = $parser->mStripState->unstripNoWiki($delimiter);
206207 # let '\n' represent newlines
207208 $delimiter = str_replace('\n', "\n", $delimiter);
 209+ $new_delimiter = str_replace('\n', "\n", $new_delimiter);
208210
209211 $values_array = explode($delimiter, $value);
210212 $results_array = array();
@@ -224,6 +226,7 @@
225227 static function renderArrayMapTemplate( &$parser, $value = '', $template = '', $delimiter = ',', $new_delimiter = ', ' ) {
226228 # let '\n' represent newlines
227229 $delimiter = str_replace('\n', "\n", $delimiter);
 230+ $new_delimiter = str_replace('\n', "\n", $new_delimiter);
228231 $values_array = explode($parser->mStripState->unstripNoWiki($delimiter), $value);
229232 $results = array();
230233 $template = trim($template);
@@ -252,6 +255,7 @@
253256 $delimiter = $parser->mStripState->unstripNoWiki($delimiter);
254257 # let '\n' represent newlines
255258 $delimiter = str_replace('\n', "\n", $delimiter);
 259+ $new_delimiter = str_replace('\n', "\n", $new_delimiter);
256260
257261 $values_array = explode($delimiter, $value);
258262 $results_array = array();

Status & tagging log