fix picture assignment to spot message
This commit is contained in:
@@ -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, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user