r113131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113130‎ | r113131 | r113132 >
Date:13:27, 6 March 2012
Author:yaron
Status:ok
Tags:
Comment:
Added handling for whitespaces around the '=' for parameters of #set_internal
Modified paths:
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
@@ -289,11 +289,11 @@
290290 $internalObject->addPropertyAndValue( $objToPagePropName, self::$mCurPageFullName );
291291
292292 foreach ( $params as $param ) {
293 - $parts = explode( '=', trim( $param ), 2 );
 293+ $parts = explode( '=', $param, 2 );
294294
295295 if ( count( $parts ) == 2 ) {
296 - $key = $parts[0];
297 - $value = $parts[1];
 296+ $key = trim( $parts[0] );
 297+ $value = trim( $parts[1] );
298298 // if the property name ends with '#list', it's
299299 // a comma-delimited group of values
300300 if ( substr( $key, - 5 ) == '#list' ) {

Status & tagging log