Skip to content

Commit 9e0f118

Browse files
author
latham
committed
1 parent 8208525 commit 9e0f118

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,24 +2450,29 @@ public function client_change_password($session_id, $client_id, $new_password) {
24502450
return false;
24512451
}
24522452
}
2453-
2453+
2454+
/**
2455+
* Fetch the mail_domain record for the provided domain.
2456+
* @param int session_id
2457+
* @param string the fully qualified domain (or subdomain)
2458+
* @return array array of arrays corresponding to the mail_domain table's records
2459+
* @author till, benlake
2460+
*/
24542461
public function mail_domain_get_by_domain($session_id, $domain) {
24552462
global $app;
24562463
if(!$this->checkPerm($session_id, 'mail_domain_get_by_domain')) {
24572464
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
24582465
return false;
24592466
}
2460-
if (!empty($domain_id)) {
2467+
if (!empty($domain)) {
24612468
$domain = $app->db->quote($domain);
2462-
$sql = "SELECT * FROM mail_domain WHERE domain = $domain";
2469+
$sql = "SELECT * FROM mail_domain WHERE domain = '$domain'";
24632470
$result = $app->db->queryAllRecords($sql);
24642471
return $result;
24652472
}
24662473
return false;
24672474
}
2468-
2469-
2470-
2475+
24712476
/**
24722477
* Get a list of functions
24732478
* @param int session id

0 commit comments

Comments
 (0)