convert validate/check functions

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-20 21:00:39 +01:00
parent 5888927239
commit b0df4e46d6
39 changed files with 952 additions and 1355 deletions

View File

@@ -47,14 +47,14 @@ abstract class DnsBase
$nameserver = trim($nameserver);
// DNS servers might be multi homed; allow transfer from all ip
// addresses of the DNS server
$nameserver_ips = gethostbynamel6($nameserver);
$nameserver_ips = \Froxlor\PhpHelper::gethostbynamel6($nameserver);
// append dot to hostname
if (substr($nameserver, - 1, 1) != '.') {
$nameserver .= '.';
}
// ignore invalid responses
if (! is_array($nameserver_ips)) {
// act like gethostbynamel6() and return unmodified hostname on error
// act like \Froxlor\PhpHelper::gethostbynamel6() and return unmodified hostname on error
$nameserver_ips = array(
$nameserver
);

View File

@@ -116,7 +116,7 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
* so users in the database don't conflict with system users
*/
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
checkLastGuid();
\Froxlor\System\Cronjob::checkLastGuid();
// shutdown cron
include_once \Froxlor\Froxlor::getInstallDir() . '/lib/cron_shutdown.php';