r95556 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95555‎ | r95556 | r95557 >
Date:14:06, 26 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some fixes to issues reported by Michael Erdmann and Kai Kühn
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Record.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_PrintRequest.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
@@ -55,7 +55,7 @@
5656 $subject = SMWDataValueFactory::newTypeIDValue( '_wpg', $pagename );
5757 $pagename = $subject->isValid() ? $subject->getText() : '';
5858 $property = SMWPropertyValue::makeUserProperty( $propname );
59 - $propname = $property->isvalid() ? $property->getWikiValue() : '';
 59+ $propname = $property->isValid() ? $property->getWikiValue() : '';
6060
6161 // Produce output
6262 $html = '';
Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Record.php
@@ -242,9 +242,9 @@
243243
244244 if ( count( $dataItems ) == 1 ) {
245245 $propertyListValue = new SMWPropertyListValue( '__pls' );
246 - $propertyListValue->setDataItem( $dataItems[0] );
 246+ $propertyListValue->setDataItem( reset( $dataItems ) );
247247
248 - if ( $propertyListValue->isvalid() ) {
 248+ if ( $propertyListValue->isValid() ) {
249249 return $propertyListValue->getPropertyDataItems();
250250 }
251251 }
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_PrintRequest.php
@@ -46,7 +46,7 @@
4747 if ( ( ( $mode == self::PRINT_CATS || $mode == self::PRINT_THIS ) &&
4848 $data !== null ) ||
4949 ( $mode == self::PRINT_PROP &&
50 - ( !( $data instanceof SMWPropertyValue ) || !$data->isvalid() ) ) ||
 50+ ( !( $data instanceof SMWPropertyValue ) || !$data->isValid() ) ) ||
5151 ( $mode == self::PRINT_CCAT &&
5252 !( $data instanceof Title ) ) ) {
5353 throw new InvalidArgumentException( 'Data provided for print request does not fit the type of printout.' );