From 1ef48604d2474dfbfe23645f5fa5bb0b5ea0fadc Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Fri, 19 Oct 2012 10:19:43 -0400 Subject: [PATCH] - Removed doubled lines from web_domain_edit.htm template. --- interface/lib/classes/remoting.inc.php | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 6cf9133..269a5cb 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -1261,6 +1261,13 @@ $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); return false; } + + //* Check for duplicates + $tmp = $app->db->queryOneRecord("SELECT count(database_id) as dbnum FROM web_database WHERE database_name = '".$app->db->quote($params['database_name'])."' AND server_id = '".intval($params["server_id"])."'"); + if($tmp['dbnum'] > 0) { + $this->server->fault('database_name_error_unique', 'There is already a database with that name on the same server.'); + return false; + } $sql = $this->insertQueryPrepare('../sites/form/database.tform.php', $client_id, $params); if($sql !== false) { -- Gitblit v1.9.1