r105858 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105857‎ | r105858 | r105859 >
Date:09:16, 12 December 2011
Author:ning
Status:deferred
Tags:
Comment:
bug fix, sub query in property not supported
Modified paths:
  • /trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Property.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Property.php
@@ -33,7 +33,7 @@
3434 $smwdatavalue = null;
3535 // FIXME: property should be collection object according to templates
3636 // if template/field used
37 - if ( preg_match( '/\{\{.+\}\}/s', $value . $caption ) ) {
 37+ if ( preg_match ( '/\{\{.+\}\}/s', $value . $caption ) ) {
3838 $value = $value . ( $caption == '' ? '' : "|{$caption}" );
3939 $caption = '';
4040 } else {
@@ -42,6 +42,9 @@
4343 } else {
4444 $smwdatavalue = SMWDataValueFactory::newPropertyObjectValue( $user_property, $value, $caption );
4545 }
 46+ if ( count ( $smwdatavalue->getErrors() ) > 0 ) {
 47+ $smwdatavalue = null;
 48+ }
4649 }
4750
4851 $this->m_user_property = $user_property;

Status & tagging log