From 7d52e00a51450bc4a080d4e21b7dda02c0a65191 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 14 Nov 2013 05:42:06 -0500
Subject: [PATCH] Fixed list sorting
---
server/plugins-available/bind_dlz_plugin.inc.php | 56 ++++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/server/plugins-available/bind_dlz_plugin.inc.php b/server/plugins-available/bind_dlz_plugin.inc.php
index 6409270..28aff94 100644
--- a/server/plugins-available/bind_dlz_plugin.inc.php
+++ b/server/plugins-available/bind_dlz_plugin.inc.php
@@ -77,7 +77,7 @@
global $conf;
if(isset($conf['bind']['installed']) && $conf['bind']['installed'] == true) {
- // Temporary disabled until the installer supports the automatic creatin of the nescessary
+ // Temporarily disabled until the installer supports the automatic creation of the necessary
// database or at least to select between filebased nd db based bind, as not all bind versions
// support dlz out of the box. To enable this plugin manually, create a symlink from the plugins-enabled
// directory to this file in the plugins-available directory.
@@ -125,13 +125,13 @@
$ttl = $data["new"]["ttl"];
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
- $_db->query("INSERT INTO records (zone, ttl, type, primary_ns, resp_contact, serial, refresh, retry, expire, minimum, ispconfig_id) VALUES ".
+ $app->db->query("INSERT INTO named.records (zone, ttl, type, primary_ns, resp_contact, serial, refresh, retry, expire, minimum, ispconfig_id) VALUES ".
"('$origin', $ttl, 'SOA', '{$data["new"]["ns"]}', '{$data["new"]["mbox"]}', '{$serial["serial"]}', '{$serial["refresh"]}'," .
"'{$serial["retry"]}', '{$serial["expire"]}', '{$serial["minimum"]}', $ispconfig_id)");
- unset($_db);
+ //unset($_db);
}
function soa_update($event_name,$data)
@@ -153,13 +153,13 @@
$ttl = $data["new"]["ttl"];
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
- $_db->query("UPDATE records SET zone = '$origin', ttl = $ttl, primary_ns = '{$data["new"]["ns"]}', resp_contact = '{$data["new"]["mbox"]}', ".
+ $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, primary_ns = '{$data["new"]["ns"]}', resp_contact = '{$data["new"]["mbox"]}', ".
"serial = '{$serial["serial"]}', refresh = '{$serial["refresh"]}', retry = '{$serial["retry"]}', expire = '{$serial["expire"]}', ".
"minimum = '{$serial["minimum"]}' WHERE ispconfig_id = ".$data["new"]["id"]." AND type = 'SOA'");
- unset($_db);
+ //unset($_db);
}
else
{
@@ -185,11 +185,11 @@
{
global $app, $conf;
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
- $_db->query("DELETE FROM records WHERE ispconfig_id = {$data["old"]["id"]}");
- unset($_db);
+ $app->db->query("DELETE FROM named.records WHERE ispconfig_id = {$data["old"]["id"]}");
+ //unset($_db);
}
function rr_insert($event_name,$data)
@@ -246,18 +246,18 @@
$ttl = $data["new"]["ttl"];
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
if ($type == 'MX') {
- $_db->query("INSERT INTO records (zone, ttl, type, host, mx_priority, data, ispconfig_id)".
+ $app->db->query("INSERT INTO named.records (zone, ttl, type, host, mx_priority, data, ispconfig_id)".
" VALUES ('$origin', $ttl, '$type', '$name', {$data["new"]["aux"]}, '$content', $ispconfig_id)");
} else {
- $_db->query("INSERT INTO records (zone, ttl, type, host, data, ispconfig_id)".
+ $app->db->query("INSERT INTO named.records (zone, ttl, type, host, data, ispconfig_id)".
" VALUES ('$origin', $ttl, '$type', '$name', '$content', $ispconfig_id)");
}
- unset($_db);
+ //unset($_db);
}
function rr_update($event_name,$data)
@@ -321,18 +321,18 @@
$ttl = $data["new"]["ttl"];
$prio = (int)$data["new"]["aux"];
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
if ($type == 'MX') {
- $_db->query("UPDATE records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', mx_priority = $prio, ".
+ $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', mx_priority = $prio, ".
"data = '$content' WHERE ispconfig_id = $ispconfig_id AND type != 'SOA'");
} else {
- $_db->query("UPDATE records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', ".
+ $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', ".
"data = '$content' WHERE ispconfig_id = $ispconfig_id AND type != 'SOA'");
}
- unset($_db);
+ //unset($_db);
} else {
$this->rr_insert($event_name,$data);
}
@@ -342,11 +342,11 @@
function rr_delete($event_name,$data) {
global $app, $conf;
- $_db = clone $app->db;
- $_db->dbName = 'named';
+ //$_db = clone $app->db;
+ //$_db->dbName = 'named';
- $_db->query("DELETE FROM named.records WHERE ispconfig_id = {$data["old"]["id"]} AND type != 'SOA'");
- unset($_db);
+ $app->db->query("DELETE FROM named.records WHERE ispconfig_id = {$data["old"]["id"]} AND type != 'SOA'");
+ //unset($_db);
}
} // end class
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1