Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
ISPConfig 3
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 489
    • Issues 489
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 25
    • Merge Requests 25
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #371

Closed
Open
Opened Jan 29, 2009 by Bergur Haukdal@bergur01

Serial number update when adding a record to dns zone

Hi!

In this function in all the dns_*_edit.php in interface/web/dns:

function onAfterInsert() { global $app, $conf;

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

            //* Update the serial number of the SOA record
            $soa_id = intval($_POST["zone"]);
            $serial = $app->validate_dns->increase_serial($soa["serial"]);
            $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id);
    }

sys_groupid is being selected from dns_soa, but later in the function $soa["serial"] is used to get the current serial, but that doesn't work because serial is not being fetched in the sql query.

Query should look like this: ("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'))

Note the added "serial".

Ain't I right ? :D

Thanks, Bergur

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ispconfig/ispconfig3#371