Marius Cramer
2015-04-15 3a11d23a2f32a1b9b2ec43429917c000017c5eff
interface/web/dns/dns_rr_del.php
@@ -39,13 +39,30 @@
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('dns');
$app->uses("tform_actions");
$app->tform_actions->onDelete();
$app->uses('tpl,tform,tform_actions,validate_dns');
$app->load('tform_actions');
?>
class page_action extends tform_actions {
   function onAfterDelete() {
      global $app; $conf;
      //* Update the serial number of the SOA record
      $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]);
      $soa_id = $app->functions->intval($this->dataRecord["zone"]);
      $serial = $app->validate_dns->increase_serial($soa["serial"]);
      $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id);
   }
}
$page = new page_action;
$page->onDelete();
?>