Skip to content

Commit e0f7cda

Browse files
author
bergur01
committed
Added serial into the SQL SELECT query for the function that gets the current serial number and increases it.
-Bergur
1 parent 4fd9501 commit e0f7cda

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

interface/web/dns/dns_a_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -131,4 +131,4 @@ function onAfterUpdate() {
131131
$page = new page_action;
132132
$page->onLoad();
133133

134-
?>
134+
?>

interface/web/dns/dns_alias_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_cname_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_hinfo_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_mx_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_ns_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_ptr_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_rp_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_srv_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

interface/web/dns/dns_txt_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function onAfterInsert() {
107107
global $app, $conf;
108108

109109
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
110-
$soa = $app->db->queryOneRecord("SELECT sys_groupid FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
110+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
111111
$app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id);
112112

113113
//* Update the serial number of the SOA record
@@ -130,4 +130,4 @@ function onAfterUpdate() {
130130
$page = new page_action;
131131
$page->onLoad();
132132

133-
?>
133+
?>

0 commit comments

Comments
 (0)