Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390472 )
Change subject: Fix for calendar display of date function ...................................................................... Fix for calendar display of date function Change-Id: I80650636ecfdbb054241a13bd4cd9f79a9cc545e --- M specials/CargoExport.php 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/CargoExport.php b/specials/CargoExport.php index 3501d91..c642256 100644 --- a/specials/CargoExport.php +++ b/specials/CargoExport.php @@ -157,7 +157,16 @@ $startDateField = $dateFieldAliases[0]; $startDate = $queryResult[$startDateField]; $startDatePrecisionField = $startDateField . '__precision'; - $startDatePrecision = $queryResult[$startDatePrecisionField]; + // There might not be a precision field, if, + // for instance, the date field is an SQL + // function. Ideally we would figure out + // the right precision, but for now just + // go with "DATE_ONLY" - seems safe. + if ( array_key_exists( $startDatePrecisionField, $queryResult ) ) { + $startDatePrecision = $queryResult[$startDatePrecisionField]; + } else { + $startDatePrecision = CargoStore::DATE_ONLY; + } $curEvent = array( // Get first field for the title - not // necessarily the page name. -- To view, visit https://gerrit.wikimedia.org/r/390472 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80650636ecfdbb054241a13bd4cd9f79a9cc545e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits