Fix taken On / Posted On Media Dates

This commit is contained in:
2019-12-13 19:46:15 +01:00
parent 079ac221de
commit 1d7e9d10c0
2 changed files with 5 additions and 4 deletions

View File

@@ -208,7 +208,7 @@ class Spot extends Main
}
/**
* Get valid medias based on $sTimeRefField (both are on site time):
* Get valid medias based on $sTimeRefField:
* - taken_on: Date/time on which the media was taken
* - posted_on: Date/time on which the media was uploaded
* @param String $sTimeRefField Field to calculate relative times
@@ -222,6 +222,7 @@ class Spot extends Main
$sTimeRef = $asMedia[$sTimeRefField];
if($sTimeRef >= $this->oProject->getActivePeriod('from') && $sTimeRef <= $this->oProject->getActivePeriod('to')) {
$asMedia['taken_on_formatted'] = $this->getTimeFormat(strtotime($asMedia['taken_on']));
$asMedia['posted_on_formatted'] = $this->getTimeFormat(strtotime($asMedia['posted_on']));
$asMedia['displayed_id'] = $iIndex + 1;
$this->addTimeStamp($asMedia, strtotime($sTimeRef));