r43511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43510‎ | r43511 | r43512 >
Date:23:40, 14 November 2008
Author:brion
Status:ok
Tags:
Comment:
Tweak to r43493 -- trim whitespace on the inside right side of the quote as well as the left (was incorrectly re-stripping outside the quote, where we already stripped whitespace)
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTree.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTree.php
@@ -290,7 +290,7 @@
291291 foreach ( $params as $p ) {
292292 if ( preg_match('/^\s*(\S.*?)\s*=\s*(.*?)\s*$/', $p, $m) ) {
293293 $k = $m[1];
294 - $v = preg_replace('/^"\s*(.*?)"\s*$/', '$1', $m[2]); //strip any quotes enclusing the value
 294+ $v = preg_replace('/^"\s*(.*?)\s*"$/', '$1', $m[2]); //strip any quotes enclusing the value
295295 }
296296 else {
297297 $k = trim($p);

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43493strip quotes from parameter values given io parameter function. quotes become...daniel13:03, 14 November 2008

Status & tagging log