http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89978
Revision: 89978
Author: jeroendedauw
Date: 2011-06-13 16:36:16 +0000 (Mon, 13 Jun 2011)
Log Message:
-----------
fixed some compat issues, but the set_recurring_event code is still not working
properly
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php
Modified:
trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php
===================================================================
---
trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php
2011-06-13 16:26:56 UTC (rev 89977)
+++
trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SetRecurringEvent.php
2011-06-13 16:36:16 UTC (rev 89978)
@@ -104,7 +104,7 @@
foreach ( $excluded_dates as $date_str
) {
$date =
SMWDataValueFactory::newTypeIDValue( '_dat', $date_str );
- $excluded_dates_jd[] =
$date->getValueKey();
+ $excluded_dates_jd[] =
$date->getDataItem()->getJD();
}
break;
default:
@@ -136,14 +136,12 @@
}
// Get the Julian day value for both the start and end date.
- $start_date_jd = $start_date->getValueKey();
-
if ( !is_null( $end_date ) ) {
- $end_date_jd = $end_date->getValueKey();
+ $end_date_jd = $end_date->getDataItem()->getJD();
}
$cur_date = $start_date;
- $cur_date_jd = $start_date->getValueKey();
+ $cur_date_jd = $start_date->getDataItem()->getJD();
$i = 0;
$reached_end_date = false;
@@ -177,7 +175,7 @@
$date_str = "$cur_year-$display_month-$cur_day
$cur_time";
$cur_date =
SMWDataValueFactory::newTypeIDValue( '_dat', $date_str );
- $cur_date_jd = $cur_date->getValueKey();
+ $cur_date_jd =
$cur_date->getDataItem()->getJD();
} elseif ( $unit == 'dayofweekinmonth' ) {
// e.g., "3rd Monday of every month"
$prev_month = $cur_date->getMonth();
@@ -236,6 +234,7 @@
// Handle the 'include' dates as well.
$all_date_strings = array_merge( $all_date_strings,
$included_dates);
+
return array( $property_name, $all_date_strings, $unused_params
);
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs