mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix problem viewing status -> agent status on single tenant systems.
This commit is contained in:
@@ -31,7 +31,7 @@ include "root.php";
|
||||
public $domain_uuid;
|
||||
public $domain_name;
|
||||
public $extension_uuid;
|
||||
private $extension;
|
||||
public $extension;
|
||||
public $enabled;
|
||||
private $dial_string;
|
||||
|
||||
@@ -68,13 +68,23 @@ include "root.php";
|
||||
//determine whether to update the dial string
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||
$sql .= "and extension_uuid = '".$this->extension_uuid."' ";
|
||||
if ($this->extension_uuid) > 0) {
|
||||
$sql .= "and extension_uuid = '".$this->extension_uuid."' ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and extension = '".$this->extension."' ";
|
||||
}
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) {
|
||||
foreach ($result as &$row) {
|
||||
$this->extension = $row["extension"];
|
||||
if ($this->extension_uuid) == 0) {
|
||||
$this->extension_uuid = $row["extension_uuid"];
|
||||
}
|
||||
if ($this->extension) == 0) {
|
||||
$this->extension = $row["extension"];
|
||||
}
|
||||
}
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
Reference in New Issue
Block a user