From 5b1ad42599c73fa7db5d4e1df344f7d5449f613e Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 25 Aug 2016 16:00:28 +0200 Subject: [PATCH] table.is_admin --- lib/php/db/table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index bd520ef9..2003e4ec 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -30,6 +30,7 @@ Class Table extends nb { public $count; public $engine; public $created; + public static $is_admin = true; # hidden, sort, ... fields public static $params = array( 'db', 'table', 'limit', 'debug', 'action' @@ -1327,7 +1328,7 @@ Class Table extends nb { // If no primary keys, we use all field if (empty($keys)) $keys = $this->fields(); - if (!($where = $this->where($keys,$hvalues,true))) { + if (!($where = $this->where($keys,$hvalues,self::$is_admin ? false : true))) { err('Db.delete(): Missing keys values'); return null; } -- 2.47.3