From cc7a82756b4f4d7ab18e928527c37489adbaf564 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Tue, 07 Apr 2015 14:10:50 -0400 Subject: [PATCH] - rewrite of sql queries to new form --- interface/web/mail/xmpp_domain_edit.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 1213a91..91566dc 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -95,7 +95,7 @@ $read_limits = array('limit_xmpp_pastebin', 'limit_xmpp_httparchive', 'limit_xmpp_anon', 'limit_xmpp_vjud', 'limit_xmpp_proxy', 'limit_xmpp_status'); if($_SESSION["s"]["user"]["typ"] != 'admin') { $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); // add limits to template to be able to hide settings foreach($read_limits as $limit) $app->tpl->setVar($limit, $client[$limit]); }else{ @@ -145,7 +145,7 @@ if($_SESSION["s"]["user"]["typ"] != 'admin') { $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $client_xmpp = $app->db->queryOneRecord("SELECT xmpp_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + $client_xmpp = $app->db->queryOneRecord("SELECT xmpp_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); $client_xmpp['xmpp_servers_ids'] = explode(',', $client_xmpp['xmpp_servers']); @@ -239,7 +239,7 @@ if($_SESSION["s"]["user"]["typ"] != 'admin') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_xmpp_domain FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT limit_xmpp_domain FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); // When the record is updated if($this->id > 0) { // restore the server ID if the user is not admin and record is edited @@ -256,7 +256,7 @@ } if($client["limit_xmpp_domain"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM xmpp_domain WHERE sys_groupid = $client_group_id"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM xmpp_domain WHERE sys_groupid = ?", $client_group_id); if($tmp["number"] >= $client["limit_xmpp_domain"]) { $app->error($app->tform->wordbook["limit_xmppdomain_txt"]); } -- Gitblit v1.9.1