Fix minor typos
This commit is contained in:
parent
ffa759ba2d
commit
9786e9d25b
@ -108,7 +108,7 @@
|
|||||||
/**
|
/**
|
||||||
* Mark as authenticated, set user
|
* Mark as authenticated, set user
|
||||||
*
|
*
|
||||||
* @param [type] $user
|
* @param uUser $user
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function setAuthenticated($user) {
|
private function setAuthenticated($user) {
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
public function addPosition($userId, $timestamp, $lat, $lon,
|
public function addPosition($userId, $timestamp, $lat, $lon,
|
||||||
$altitude = NULL, $speed = NULL, $bearing = NULL, $accuracy = NULL,
|
$altitude = NULL, $speed = NULL, $bearing = NULL, $accuracy = NULL,
|
||||||
$provider = NULL, $comment = NULL, $imageId = NULL) {
|
$provider = NULL, $comment = NULL, $imageId = NULL) {
|
||||||
return $ret = uPosition::add($userId, $this->id, $timestamp, $lat, $lon,
|
return uPosition::add($userId, $this->id, $timestamp, $lat, $lon,
|
||||||
$altitude, $speed, $bearing, $accuracy, $provider, $comment, $imageId);
|
$altitude, $speed, $bearing, $accuracy, $provider, $comment, $imageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ exit(0);
|
|||||||
/* Helper functions */
|
/* Helper functions */
|
||||||
|
|
||||||
/** Import tracks metadata for given user
|
/** Import tracks metadata for given user
|
||||||
* @param $user_id User id
|
* @param int $user_id User id
|
||||||
*/
|
*/
|
||||||
function process_user_tracks($user_id) {
|
function process_user_tracks($user_id) {
|
||||||
global $pt_mysqli, $mysqli;
|
global $pt_mysqli, $mysqli;
|
||||||
@ -170,9 +170,9 @@ function process_user_tracks($user_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Import positions for given track
|
/** Import positions for given track
|
||||||
* @param $user_id User id
|
* @param int $user_id User id
|
||||||
* @param $old_id Old database track id
|
* @param int $old_id Old database track id
|
||||||
* @param $new_id New database track id
|
* @param int $new_id New database track id
|
||||||
*/
|
*/
|
||||||
function process_track($user_id, $old_id, $new_id) {
|
function process_track($user_id, $old_id, $new_id) {
|
||||||
global $pt_mysqli, $mysqli;
|
global $pt_mysqli, $mysqli;
|
||||||
|
@ -120,7 +120,9 @@ if ($trackId && $userId) {
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$totalMeters = 0;
|
$totalMeters = 0;
|
||||||
$totalSeconds = 0;
|
$totalSeconds = 0;
|
||||||
|
$coordinate = [];
|
||||||
foreach ($positionsArr as $position) {
|
foreach ($positionsArr as $position) {
|
||||||
|
/** @var uPosition $prevPosition */
|
||||||
$distance = isset($prevPosition) ? $position->distanceTo($prevPosition) : 0;
|
$distance = isset($prevPosition) ? $position->distanceTo($prevPosition) : 0;
|
||||||
$seconds = isset($prevPosition) ? $position->secondsTo($prevPosition) : 0;
|
$seconds = isset($prevPosition) ? $position->secondsTo($prevPosition) : 0;
|
||||||
$prevPosition = $position;
|
$prevPosition = $position;
|
||||||
|
@ -51,6 +51,7 @@ $xml->setIndent(true);
|
|||||||
$xml->startElement('root');
|
$xml->startElement('root');
|
||||||
|
|
||||||
foreach ($positionsArr as $position) {
|
foreach ($positionsArr as $position) {
|
||||||
|
/** @var uPosition $prevPosition */
|
||||||
$xml->startElement("position");
|
$xml->startElement("position");
|
||||||
$xml->writeAttribute("id", $position->id);
|
$xml->writeAttribute("id", $position->id);
|
||||||
$xml->writeElement("latitude", $position->latitude);
|
$xml->writeElement("latitude", $position->latitude);
|
||||||
|
@ -25,6 +25,7 @@ require_once(ROOT_DIR . "/lang.php");
|
|||||||
|
|
||||||
$auth = new uAuth();
|
$auth = new uAuth();
|
||||||
|
|
||||||
|
$uploadErrors = [];
|
||||||
$uploadErrors[UPLOAD_ERR_INI_SIZE] = "The uploaded file exceeds the upload_max_filesize directive in php.ini";
|
$uploadErrors[UPLOAD_ERR_INI_SIZE] = "The uploaded file exceeds the upload_max_filesize directive in php.ini";
|
||||||
$uploadErrors[UPLOAD_ERR_FORM_SIZE] = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form";
|
$uploadErrors[UPLOAD_ERR_FORM_SIZE] = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form";
|
||||||
$uploadErrors[UPLOAD_ERR_PARTIAL] = "The uploaded file was only partially uploaded";
|
$uploadErrors[UPLOAD_ERR_PARTIAL] = "The uploaded file was only partially uploaded";
|
||||||
@ -56,9 +57,9 @@ if ($uploadErr == UPLOAD_ERR_OK) {
|
|||||||
$gpxFile = $gpxUpload["tmp_name"];
|
$gpxFile = $gpxUpload["tmp_name"];
|
||||||
$gpxName = basename($gpxUpload["name"]);
|
$gpxName = basename($gpxUpload["name"]);
|
||||||
} else {
|
} else {
|
||||||
$message = $lang("iuploadfailure");
|
$message = $lang["iuploadfailure"];
|
||||||
if (isset($errorMessage[$uploadErr])) {
|
if (isset($uploadErrors[$uploadErr])) {
|
||||||
$message .= ": " . $errorMessage[$uploadErr];
|
$message .= ": " . $uploadErrors[$uploadErr];
|
||||||
}
|
}
|
||||||
$message .= " ($uploadErr)";
|
$message .= " ($uploadErr)";
|
||||||
uUtils::exitWithError($message);
|
uUtils::exitWithError($message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user