#272: Cronjob timestamps for resellers

This commit is contained in:
Ulrich Block 2014-01-10 22:16:51 +01:00
parent 0995f9d3cc
commit 15bff6b3db
6 changed files with 10 additions and 14 deletions

View File

@ -870,7 +870,7 @@ if (!isset($ip) or $_SERVER['SERVER_ADDR'] == $ip) {
}
$query = $sql->prepare("UPDATE `settings` SET `lastCronCloud`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1");
$query = $sql->prepare("UPDATE `settings` SET `lastCronCloud`=UNIX_TIMESTAMP()");
$query->execute();
} else {

View File

@ -239,7 +239,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
} else {
$runJobs = false;
}
$query = $sql->prepare("UPDATE `settings` SET `lastCronJobs`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1");
$query = $sql->prepare("UPDATE `settings` SET `lastCronJobs`=UNIX_TIMESTAMP()");
$query->execute();
}
}

View File

@ -550,7 +550,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$query->execute();
}
$query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1");
$query = $sql->prepare("UPDATE `settings` SET `lastCronReboot`=UNIX_TIMESTAMP()");
$query->execute();
} else {

View File

@ -107,6 +107,6 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
unset($rootServer);
}
$query = $sql->prepare("UPDATE `settings` SET `lastCronUpdates`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1");
$query = $sql->prepare("UPDATE `settings` SET `lastCronUpdates`=UNIX_TIMESTAMP()");
$query->execute();
}

View File

@ -738,7 +738,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$sd = $connection->ServerDetails($virtualserver_id);
$newtrafficdata=round(($sd['connection_filetransfer_bytes_sent_total']+$sd['connection_filetransfer_bytes_received_total']) / 1024);
if ($resellersettings[$resellerid]['firstchecktime']<$resellersettings[$resellerid]['firstcheck']) {
if (isset($resellersettings[$resellerid]['firstchecktime']) and isset($resellersettings[$resellerid]['firstcheck']) and $resellersettings[$resellerid]['firstchecktime'] < $resellersettings[$resellerid]['firstcheck']) {
$filetraffic = 0;
}
@ -971,7 +971,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
}
}
flush();
$query = $sql->prepare("UPDATE `settings` SET `lastCronStatus`=UNIX_TIMESTAMP() WHERE `resellerid`=0 LIMIT 1");
$query = $sql->prepare("UPDATE `settings` SET `lastCronStatus`=UNIX_TIMESTAMP()");
$query->execute();
} else {
header('Location: login.php');

View File

@ -272,10 +272,6 @@ if ($loguserip!='localhost') {
$page_detect_language = $elements[0];
if (substr($ui->escaped('REQUEST_URI', 'server'),-1) != '/' and !$ui->w('site',50, 'get')) {
$throw404 = true;
}
if (!preg_match('/^[a-z]{2}+$/', $elements[0]) and !$ui->w('site', 50, 'get')) {
$throw404 = true;
}