From 02654a256d9a191b2af6302cdb2586d0d1d747f7 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 14 May 2016 08:59:46 +0200 Subject: [PATCH] fix sql query in getAllowedDomainEntry() Signed-off-by: Michael Kaufmann (d00p) --- lib/functions/dns/function.generateDkimEntries.php | 2 +- lib/functions/dns/function.getAllowedDomainEntry.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/functions/dns/function.generateDkimEntries.php b/lib/functions/dns/function.generateDkimEntries.php index 4b53d056..e3d5e95a 100644 --- a/lib/functions/dns/function.generateDkimEntries.php +++ b/lib/functions/dns/function.generateDkimEntries.php @@ -84,4 +84,4 @@ function generateDkimEntries($domain) } return $zone_dkim; -} \ No newline at end of file +} diff --git a/lib/functions/dns/function.getAllowedDomainEntry.php b/lib/functions/dns/function.getAllowedDomainEntry.php index 29ba2a55..8026859c 100644 --- a/lib/functions/dns/function.getAllowedDomainEntry.php +++ b/lib/functions/dns/function.getAllowedDomainEntry.php @@ -24,18 +24,18 @@ function getAllowedDomainEntry($domain_id, $area = 'customer', $userinfo, &$idna $where_clause = ''; if ($area == 'admin') { if ($userinfo['domains_see_all'] != '1') { - $where_clause = '`adminid` = :uid'; + $where_clause = '`adminid` = :uid AND '; $dom_data['uid'] = $userinfo['userid']; } } else { - $where_clause = '`customerid` = :uid'; + $where_clause = '`customerid` = :uid AND '; $dom_data['uid'] = $userinfo['userid']; } $dom_stmt = Database::prepare(" SELECT domain, isbinddomain FROM `" . TABLE_PANEL_DOMAINS . "` - WHERE " . $where_clause . " AND id = :did + WHERE " . $where_clause . " id = :did "); $domain = Database::pexecute_first($dom_stmt, $dom_data);