From cca81d080cd75d9297adb6bfd05c8dc3cda36db8 Mon Sep 17 00:00:00 2001 From: Laurent Giovannoni <laurent.giovannoni@maarch.org> Date: Thu, 9 Jul 2015 10:46:59 +0000 Subject: [PATCH] FEAT #2681 --- core/trunk/core/class/SecurityControler.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/trunk/core/class/SecurityControler.php b/core/trunk/core/class/SecurityControler.php index f9c9664c5ba..86ad1e48855 100644 --- a/core/trunk/core/class/SecurityControler.php +++ b/core/trunk/core/class/SecurityControler.php @@ -306,8 +306,7 @@ class SecurityControler $where = ''; } $where = str_replace('where', ' ', $where); - $db = new dbquery(); - $db->connect(); + $db = new Database(); if ($target == 'ALL' || $target == 'DOC') { $query = 'select res_id from ' . $view . ' where ' . $where; @@ -317,7 +316,7 @@ class SecurityControler . ' where '. $where; } - $ok = $db->query($query, true); + $ok = $db->query($query); if (!$ok) { $res['TXT'] = _SYNTAX_ERROR_WHERE_CLAUSE; return $res; @@ -641,8 +640,8 @@ class SecurityControler . $_SESSION['collections'][$ind]['view'] . " where (" . $where . ') and res_id = ' . $objectId; } - $db = new dbquery(); - $db->connect(); + $db = new Database(); + if (! empty($query)) { $db->query($query); } -- GitLab