A. Täffner
2016-04-11 f2a687565f6b3e34c4f4762506bdf94c12f796c7
neew db style also for cron
1 files modified
2 ■■■ changed files
server/lib/classes/cron.d/550-bind_dnssec.inc.php 2 ●●● patch | view | raw | blame | history
server/lib/classes/cron.d/550-bind_dnssec.inc.php
@@ -69,7 +69,7 @@
        //TODO : change this when distribution information has been integrated into server record
        $filespre = (file_exists('/etc/gentoo-release')) ? 'pri/' : 'pri.';
        
        $soas = $app->db->queryAllRecords('SELECT * FROM dns_soa WHERE dnssec_wanted=\'Y\' AND dnssec_initialized=\'Y\' AND (dnssec_last_signed < '.(time()-(3600*24*5)+900)).' OR dnssec_last_signed > '.(time()+900).')'; //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance)
        $soas = $app->db->queryAllRecords('SELECT * FROM dns_soa WHERE dnssec_wanted=\'Y\' AND dnssec_initialized=\'Y\' AND (dnssec_last_signed < ? OR dnssec_last_signed > ?', time()-(3600*24*5)+900, time()+900); //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance)
        
        foreach ($soas as $data) {
            $domain = substr($data['origin'], 0, strlen($data['origin'])-1);