fix picture assignment to spot message

This commit is contained in:
2019-02-06 21:08:53 +01:00
parent 05bcbfc251
commit 29d39a9d0a
2 changed files with 2 additions and 3 deletions

View File

@@ -230,7 +230,7 @@ class Spot extends Main
if($iIndex == 0) $iMsgIndex = $iIndex;
elseif($iIndex > $iMaxIndex) $iMsgIndex = $iMaxIndex;
else {
$iHalfWayPoint = ($asMessages[$iIndex]['unix_time'] - $asMessages[$iIndex - 1]['unix_time'])/2;
$iHalfWayPoint = ($asMessages[$iIndex - 1]['unix_time'] + $asMessages[$iIndex]['unix_time'])/2;
$iMsgIndex = ($asPic['unix_time'] >= $iHalfWayPoint)?$iIndex:($iIndex - 1);
}
@@ -405,7 +405,7 @@ class Spot extends Main
public function upload()
{
$this->oClassManagement->incClass('uploader', true);
$oUploader = new Uploader($this->oPicture);
new Uploader($this->oPicture);
return self::getJsonResult(true, '');
}

1
todo
View File

@@ -6,5 +6,4 @@ To Do List
- Replace all images with FA icons
- on hover sur message : open popup on map (check zoom)
- on hover on relative time: display absolute time
- bug on picture assignment to markers (routeburn) - related to TZ issue
- Replace 'heure française' with actual project timezone