r89996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89995‎ | r89996 | r89997 >
Date:19:01, 13 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed issue with set recurring event parser function
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php
@@ -104,7 +104,7 @@
105105
106106 foreach ( $excluded_dates as $date_str ) {
107107 $date = SMWDataValueFactory::newTypeIDValue( '_dat', $date_str );
108 - $excluded_dates_jd[] = $date->getDataItem()->getJD();
 108+ $excluded_dates_jd[] = $date->getDataItem()->getSerialization();
109109 }
110110 break;
111111 default:
@@ -137,11 +137,11 @@
138138
139139 // Get the Julian day value for both the start and end date.
140140 if ( !is_null( $end_date ) ) {
141 - $end_date_jd = $end_date->getDataItem()->getJD();
 141+ $end_date_jd = $end_date->getDataItem()->getSerialization();
142142 }
143143
144144 $cur_date = $start_date;
145 - $cur_date_jd = $start_date->getDataItem()->getJD();
 145+ $cur_date_jd = $start_date->getDataItem()->getSerialization();
146146 $i = 0;
147147 $reached_end_date = false;
148148
@@ -175,7 +175,6 @@
176176
177177 $date_str = "$cur_year-$display_month-$cur_day $cur_time";
178178 $cur_date = SMWDataValueFactory::newTypeIDValue( '_dat', $date_str );
179 - $cur_date_jd = $cur_date->getDataItem()->getJD();
180179 } elseif ( $unit == 'dayofweekinmonth' ) {
181180 // e.g., "3rd Monday of every month"
182181 $prev_month = $cur_date->getMonth();