r89338 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89337‎ | r89338 | r89339 >
Date:14:21, 2 June 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
fixed declare parser function for SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Declare.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Declare.php
@@ -48,7 +48,7 @@
4949
5050 if ( $type == '_wpg' ) {
5151 $matches = array();
52 - preg_match_all( '/\[\[([^\[\]]*)\]\]/', $valuestring, $matches );
 52+ preg_match_all( '/\[\[([^\[\]]*)\]\]/u', $valuestring, $matches );
5353 $objects = $matches[1];
5454
5555 if ( count( $objects ) == 0 ) {
@@ -60,13 +60,11 @@
6161 SMWParseData::addProperty( $propertystring, $object, false, $parser, true );
6262 }
6363 }
64 - } else {
65 - if ( trim( $valuestring ) != '' ) {
 64+ } elseif ( trim( $valuestring ) != '' ) {
6665 SMWParseData::addProperty( $propertystring, $valuestring, false, $parser, true );
67 - }
6866 }
6967
70 - $value = SMWDataValueFactory::newPropertyObjectValue( $property, $valuestring );
 68+ // $value = SMWDataValueFactory::newPropertyObjectValue( $property->getDataItem(), $valuestring );
7169 // if (!$value->isValid()) continue;
7270 }
7371 }

Status & tagging log