From 3f478f7b37eb314c7dba33af10e8d32d5f2fa579 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Fri, 19 Apr 2013 05:35:57 -0400 Subject: [PATCH] Merged revisions 3922-3958 from stable branch. --- interface/web/dns/dns_slave_edit.php | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/interface/web/dns/dns_slave_edit.php b/interface/web/dns/dns_slave_edit.php index 82d62b4..2a5247a 100644 --- a/interface/web/dns/dns_slave_edit.php +++ b/interface/web/dns/dns_slave_edit.php @@ -158,6 +158,17 @@ parent::onSubmit(); } + function onInsert() { + global $app, $conf; + + // Check if record is existing already + $duplicate_slave = $app->db->queryOneRecord("SELECT * FROM dns_slave WHERE origin = '".$this->dataRecord["origin"]."' AND server_id = ".$app->functions->intval($this->dataRecord["server_id"])." AND ".$app->tform->getAuthSQL('r')); + + if(is_array($duplicate_slave) && !empty($duplicate_slave)) $app->error($app->tform->wordbook["origin_error_unique"]); + + parent::onInsert(); + } + function onAfterInsert() { global $app, $conf; -- Gitblit v1.9.1