From 29d39a9d0ab5cdcba91e061ebf83d8625519ecf2 Mon Sep 17 00:00:00 2001 From: franzz Date: Wed, 6 Feb 2019 21:08:53 +0100 Subject: [PATCH] fix picture assignment to spot message --- inc/spot.php | 4 ++-- todo | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/spot.php b/inc/spot.php index add2fd7..063e7bc 100755 --- a/inc/spot.php +++ b/inc/spot.php @@ -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, ''); } diff --git a/todo b/todo index 92946f7..0634fc6 100644 --- a/todo +++ b/todo @@ -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 \ No newline at end of file