@@ -252,6 +252,9 @@ function rr_insert($event_name, $data)
252252 if ($ type == 'MX ' ) {
253253 $ app ->db ->query ("INSERT INTO named.records (zone, ttl, type, host, mx_priority, data, ispconfig_id) " .
254254 " VALUES (' $ origin', $ ttl, ' $ type', ' $ name', {$ data ["new " ]["aux " ]}, ' $ content', $ ispconfig_id) " );
255+ } elseif ($ type == 'SRV ' ) {
256+ $ app ->db ->query ("INSERT INTO named.records (zone, ttl, type, data, ispconfig_id) " .
257+ " VALUES (' $ origin', $ ttl, ' $ type', ' {$ data ["new " ]["aux " ]} $ content', $ ispconfig_id) " );
255258 } else {
256259 $ app ->db ->query ("INSERT INTO named.records (zone, ttl, type, host, data, ispconfig_id) " .
257260 " VALUES (' $ origin', $ ttl, ' $ type', ' $ name', ' $ content', $ ispconfig_id) " );
@@ -327,6 +330,9 @@ function rr_update($event_name, $data)
327330 if ($ type == 'MX ' ) {
328331 $ app ->db ->query ("UPDATE named.records SET zone = ' $ origin', ttl = $ ttl, type = ' $ type', host = ' $ name', mx_priority = $ prio, " .
329332 "data = ' $ content' WHERE ispconfig_id = $ ispconfig_id AND type != 'SOA' " );
333+ } elseif ($ type == 'SRV ' ) {
334+ $ app ->db ->query ("UPDATE named.records SET zone = ' $ origin', ttl = $ ttl, type = ' $ type', " .
335+ "data = ' $ prio $ content' WHERE ispconfig_id = $ ispconfig_id AND type != 'SOA' " );
330336 } else {
331337 $ app ->db ->query ("UPDATE named.records SET zone = ' $ origin', ttl = $ ttl, type = ' $ type', host = ' $ name', " .
332338 "data = ' $ content' WHERE ispconfig_id = $ ispconfig_id AND type != 'SOA' " );
0 commit comments