diff --git a/languages/en.lang b/languages/en.lang index 4ff4b7d..ee0d866 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -2,6 +2,7 @@ locale = en_NZ page_og_desc = Keep contact with François when he is off hiking error_commit_db = Issue committing to DB unknown_field = Field "$0" is unknown +impossible_value = Value "$0" is not possible for field "$1" nav_back = Back diff --git a/languages/es.lang b/languages/es.lang index 7f0b51a..0351078 100644 --- a/languages/es.lang +++ b/languages/es.lang @@ -2,6 +2,7 @@ locale = es_ES page_og_desc = Mantente en contacto con François durante sus aventuras a la montaña error_commit_db = Error SQL unknown_field = Campo "$0" desconocido +impossible_value = Valor "$0" no es posible para campo "$1" nav_back = Atrás diff --git a/languages/fr.lang b/languages/fr.lang index 8b44a6f..1aab245 100644 --- a/languages/fr.lang +++ b/languages/fr.lang @@ -2,6 +2,7 @@ locale = fr_CH page_og_desc = Gardez le contact avec François lorsqu'il part sur les chemins error_commit_db = Error lors de la requête SQL unknown_field = Champ "$0" inconnu +impossible_value = La valeur "$0" n'est pas possible pour le champ "$1" nav_back = Retour diff --git a/lib/Spot.php b/lib/Spot.php index d0c2b26..46c259f 100755 --- a/lib/Spot.php +++ b/lib/Spot.php @@ -28,6 +28,8 @@ use \Settings; * - Posts (table `posts`): * - site_time: timestamp in Site Time * - timezone: Local Timezone + * - Users (table `users`): + * - timezone: Site Timezone (stored user's timezone for emails) */ class Spot extends Main @@ -176,7 +178,6 @@ class Spot extends Main 'user' => $this->oUser->getUserInfo() ), 'consts' => array( - 'server' => $this->asContext['serv_name'], 'modes' => Project::MODES, 'clearances' => User::CLEARANCES, 'default_timezone' => Settings::TIMEZONE @@ -654,6 +655,8 @@ class Spot extends Main $sDesc = ''; $asResult = array(); + if($this->oDb->isId($sField) && $sValue <= 0) return self::getJsonResult(false, $this->oLang->getTranslation('impossible_value', [$sValue, $sField])); + switch($sType) { case 'project': $oProject = new Project($this->oDb, $iId);