Get the hostname of the server before the loop.

This commit is contained in:
FusionPBX 2022-08-16 18:45:48 -06:00 committed by GitHub
parent df755fae5c
commit 326544a006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -36,6 +36,11 @@
$debug = $_GET['debug'];
}
//get the hostname
if (!isset($hostname)) {
$hostname = gethostname();
}
//includes
if (!defined('STDIN')) { include_once "root.php"; }
require_once "resources/require.php";
@ -133,12 +138,7 @@
$sql .= "and hostname = :hostname ";
$sql .= "order by domain_uuid asc ";
$sql .= "limit :limit ";
if (isset($hostname)) {
$parameters['hostname'] = $hostname;
}
else {
$parameters['hostname'] = gethostname();
}
$parameters['hostname'] = $hostname;
$parameters['limit'] = $email_queue_limit;
$database = new database;
$email_queue = $database->select($sql, $parameters, 'all');