From 8b7025dd459fdbd99d1dc400a17dc7abb4d4a7ad Mon Sep 17 00:00:00 2001 From: cigamit Date: Mon, 20 Jul 2015 08:11:39 -0500 Subject: [PATCH] Correct SQL error in permissions Correcting SQL error in permissions due to bad syntax. --- lib/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth.php b/lib/auth.php index 0cf4193cf..45f3e38f2 100644 --- a/lib/auth.php +++ b/lib/auth.php @@ -964,7 +964,7 @@ function get_allowed_devices($sql_where = '', $order_by = 'description', $limit } if ($host_id > 0) { - $sql_where .= (strlen($sql_where) ? ' AND ':' ') . " gl.host_id=$host_id"; + $sql_where .= (strlen($sql_where) ? ' AND ':'WHERE ') . " gl.host_id=$host_id"; } $i = 0; @@ -1089,7 +1089,7 @@ function get_allowed_graph_templates($sql_where = '', $order_by = 'name', $limit } if ($graph_template_id > 0) { - $sql_where .= (strlen($sql_where) ? ' AND ':' ') . " gl.graph_template_id=$graph_template_id"; + $sql_where .= (strlen($sql_where) ? ' AND ':'WHERE ') . " gl.graph_template_id=$graph_template_id"; } $i = 0;