Fixed the registration count
- Fixed on the dashboard for those with superadmin group - Fixed the count in the SIP status page
This commit is contained in:
parent
665bb0e802
commit
9292dda43f
|
|
@ -80,13 +80,13 @@ if (!class_exists('registrations')) {
|
|||
$xml_response = trim(event_socket::command($cmd));
|
||||
|
||||
//show an error message
|
||||
if ($xml_response == "Invalid Profile!") {
|
||||
if ($xml_response == "Invalid Profile!") {
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get(null, '/app/registrations');
|
||||
|
||||
//show the error message
|
||||
$xml_response = "<error_msg>".escape($text['label-message'])."</error_msg>";
|
||||
$xml_response = "<error_msg>".escape($text['label-message'])."</error_msg>";
|
||||
}
|
||||
|
||||
//santize the XML
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
//registration count
|
||||
if ($esl->is_connected() && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/registrations/")) {
|
||||
$registration = new registrations;
|
||||
if (permission_exists("registration_all")) {
|
||||
$active_registrations = $registration->show = 'all';
|
||||
}
|
||||
$active_registrations = $registration->count();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -42,6 +42,9 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//create the database object
|
||||
$database = database::new();
|
||||
|
||||
//create event socket
|
||||
$esl = event_socket::create();
|
||||
if (!$esl->is_connected()) {
|
||||
|
|
@ -52,7 +55,6 @@
|
|||
$sql = "select g.domain_uuid, g.gateway, g.gateway_uuid, d.domain_name ";
|
||||
$sql .= "from v_gateways as g left ";
|
||||
$sql .= "outer join v_domains as d on d.domain_uuid = g.domain_uuid";
|
||||
$database = new database;
|
||||
$gateways = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
|
|
@ -69,7 +71,6 @@
|
|||
$parameters['sip_profile_hostname'] = $hostname;
|
||||
}
|
||||
$sql .= "order by sip_profile_name asc ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters ?? null, 'all');
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
|
|
@ -104,6 +105,7 @@
|
|||
|
||||
//define registration object
|
||||
$registration = new registrations;
|
||||
$registration->show = 'all';
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['title-sip_status'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue