Skip to content
Snippets Groups Projects
Commit cca81d08 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

FEAT #2681

parent 05f44f9c
No related branches found
No related tags found
No related merge requests found
...@@ -306,8 +306,7 @@ class SecurityControler ...@@ -306,8 +306,7 @@ class SecurityControler
$where = ''; $where = '';
} }
$where = str_replace('where', ' ', $where); $where = str_replace('where', ' ', $where);
$db = new dbquery(); $db = new Database();
$db->connect();
if ($target == 'ALL' || $target == 'DOC') { if ($target == 'ALL' || $target == 'DOC') {
$query = 'select res_id from ' . $view . ' where ' . $where; $query = 'select res_id from ' . $view . ' where ' . $where;
...@@ -317,7 +316,7 @@ class SecurityControler ...@@ -317,7 +316,7 @@ class SecurityControler
. ' where '. $where; . ' where '. $where;
} }
$ok = $db->query($query, true); $ok = $db->query($query);
if (!$ok) { if (!$ok) {
$res['TXT'] = _SYNTAX_ERROR_WHERE_CLAUSE; $res['TXT'] = _SYNTAX_ERROR_WHERE_CLAUSE;
return $res; return $res;
...@@ -641,8 +640,8 @@ class SecurityControler ...@@ -641,8 +640,8 @@ class SecurityControler
. $_SESSION['collections'][$ind]['view'] . " where (" . $_SESSION['collections'][$ind]['view'] . " where ("
. $where . ') and res_id = ' . $objectId; . $where . ') and res_id = ' . $objectId;
} }
$db = new dbquery(); $db = new Database();
$db->connect();
if (! empty($query)) { if (! empty($query)) {
$db->query($query); $db->query($query);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment