Thread: Dynamic DNS
View Single Post
  #6  
Old 19th September 2008, 15:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,466
Thanks: 813
Thanked 5,253 Times in 4,119 Posts
Default

There is one small modification that I would recommend. Instead of calling:

Code:
$app->db->query("UPDATE  SET  WHERE id = $id");
better use:

Code:
$app->db->datalogUpdate('dns_rr', "data = '$ip'", 'id', $id);
This will update the data in the dns_rr table and additionally create a record in the sys_datalog table which is read by the server process. This does not bring you any benefit at the moment, but your code will later benefit when:

- Other DNS plugins are available e.g. support for bind.
- If plugins at the server have to be called when a dns record changes. Without using the datalogUpdate function, your manual change would be simply ignored by all server related code.
- There is a history and undo function planned for the interface to track user interactions and to make it possible to revert changes. Without using this update function, your changes will not be tracked.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 19th September 2008 at 15:29.
Reply With Quote