Fixed Errors for Phrases, Recordings, Operator Panel and Music on Hold. (#6735)

This commit is contained in:
Anthony
2023-06-01 15:21:29 -06:00
committed by GitHub
parent 072d351b8c
commit 9c650a29b1
8 changed files with 116 additions and 93 deletions

View File

@@ -56,10 +56,6 @@ if (!class_exists('registrations')) {
*/
public function get($profile = 'all') {
//add multi-lingual support
$language = new text;
$text = $language->get();
//initialize the id used in the registrations array
$id = 0;
@@ -84,7 +80,7 @@ if (!class_exists('registrations')) {
$xml_response = trim(event_socket_request($fp, $cmd));
if (function_exists('iconv')) { $xml_response = iconv("utf-8", "utf-8//IGNORE", $xml_response); }
$xml_response = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/u', '', $xml_response);
if ($xml_response == "Invalid Profile!") { $xml_response = "<error_msg>".$text['label-message']."</error_msg>"; }
if ($xml_response == "Invalid Profile!") { $xml_response = "<error_msg>".!empty($text['label-message'])."</error_msg>"; }
$xml_response = str_replace("<profile-info>", "<profile_info>", $xml_response);
$xml_response = str_replace("</profile-info>", "</profile_info>", $xml_response);
$xml_response = str_replace("&lt;", "", $xml_response);
@@ -247,7 +243,6 @@ if (!class_exists('registrations')) {
if (is_array($records) && @sizeof($records) != 0) {
foreach($records as $record) {
if (
!empty($record['checked']) &&
$record['checked'] == 'true' &&
$record['user'] != '' &&
$record['profile'] != ''