hosts
This commit is contained in:
@@ -44,10 +44,8 @@ foreach ($hosts as $host) {
|
||||
$updateCount = null;
|
||||
$updatePreview = '';
|
||||
$updateErr = str_contains($updOutStr, '__ERR__NO_APT');
|
||||
if ($updExit === 0 && !$updateErr) {
|
||||
if (preg_match('/^__COUNT__=(\d+)$/m', $updOutStr, $m)) {
|
||||
$updateCount = (int)$m[1];
|
||||
}
|
||||
if (preg_match('/^__COUNT__=(\d+)$/m', $updOutStr, $m)) {
|
||||
$updateCount = (int)$m[1];
|
||||
}
|
||||
$updatePreview = trim($updOutStr);
|
||||
if (strlen($updatePreview) > 1200) {
|
||||
@@ -65,7 +63,7 @@ foreach ($hosts as $host) {
|
||||
}
|
||||
}
|
||||
|
||||
$updErrVal = $updExit === 0 && !$updateErr ? null : trim($updErrStr ?: $updOutStr);
|
||||
$updErrVal = (!$updateErr && $updateCount !== null) ? null : trim($updErrStr ?: $updOutStr);
|
||||
$upgErrVal = $upgExit === 0 && !$upgradeErr ? null : trim($upgErrStr ?: $upgOutStr);
|
||||
|
||||
$stmt = $pdo->prepare(
|
||||
|
||||
Reference in New Issue
Block a user