Admin: reject ID value 0
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user