r77406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77405‎ | r77406 | r77407 >
Date:22:31, 28 November 2010
Author:yaron
Status:ok
Tags:
Comment:
Fixed handling of #set_internal_recurring_event for SMW 1.5.3+
Modified paths:
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
@@ -330,10 +330,15 @@
331331 $params = func_get_args();
332332 array_shift( $params ); // We already know the $parser ...
333333
334 - // first param should be a standalone property name
 334+ // First param should be a standalone property name.
335335 $objToPagePropName = array_shift( $params );
336336
337 - $results = SMWParserExtensions::getDatesForRecurringEvent( $params );
 337+ // The location of this function changed in SMW 1.5.3
 338+ if ( class_exists( 'SMWSetRecurringEvent' ) ) {
 339+ $results = SMWSetRecurringEvent::getDatesForRecurringEvent( $params );
 340+ } else {
 341+ $results = SMWParserExtensions::getDatesForRecurringEvent( $params );
 342+ }
338343 if ( $results == null ) {
339344 return null;
340345 }

Status & tagging log