diff --git a/app/call_broadcast/call_broadcast.php b/app/call_broadcast/call_broadcast.php index ceffb50b1b..8d97755f8b 100644 --- a/app/call_broadcast/call_broadcast.php +++ b/app/call_broadcast/call_broadcast.php @@ -26,7 +26,6 @@ include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; -require_once "app_languages.php"; if (permission_exists('call_broadcast_view')) { //access granted } diff --git a/app/call_center_active/call_center_active.php b/app/call_center_active/call_center_active.php index 7e8515fc73..09361650f7 100644 --- a/app/call_center_active/call_center_active.php +++ b/app/call_center_active/call_center_active.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //get the queue_name and set it as a variable $queue_name = $_GET[queue_name]; diff --git a/app/call_flows/call_flow_delete.php b/app/call_flows/call_flow_delete.php index e0511d1e89..9174e88e34 100644 --- a/app/call_flows/call_flow_delete.php +++ b/app/call_flows/call_flow_delete.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); if (count($_GET)>0) { $id = check_str($_GET["id"]); diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index 7ce09f98ac..517afd8474 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/call_flows/call_flows.php b/app/call_flows/call_flows.php index 8013076fd5..d4351ca5ee 100644 --- a/app/call_flows/call_flows.php +++ b/app/call_flows/call_flows.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); require_once "resources/header.php"; $document['title'] = $text['title-call_flows']; diff --git a/app/calls_active/calls_active.php b/app/calls_active/calls_active.php index 69e4d661e1..ada3448feb 100644 --- a/app/calls_active/calls_active.php +++ b/app/calls_active/calls_active.php @@ -26,7 +26,6 @@ include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; -include "app_languages.php"; if (permission_exists('call_active_view')) { //access granted } diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index fb260e1322..8bbaba6420 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -26,7 +26,6 @@ include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; -include "app_languages.php"; if (permission_exists('call_active_view')) { //access granted } @@ -47,7 +46,7 @@ else { //if the connnection is available then run it and return the results if (!$fp) { - $msg = "
".$text['confirm-socket']."
"; + $msg = "
".$text['confirm-socket']."
"; echo "
\n"; echo "\n"; echo "\n"; @@ -60,7 +59,7 @@ else { echo "\n"; } else { - //send the event socket command + //send the event socket command $json = trim(event_socket_request($fp, 'api '.$switch_cmd)); //set the array $results = json_decode($json, "true"); diff --git a/app/contacts/app_defaults.php b/app/contacts/app_defaults.php index dedbb60c79..ad1094ffcc 100644 --- a/app/contacts/app_defaults.php +++ b/app/contacts/app_defaults.php @@ -12,10 +12,8 @@ if ($domains_processed == 1) { $field_exists = $obj->column_exists($db_name, 'v_contact_phones', 'phone_type'); //check if field exists if ($field_exists) { //add multi-lingual support - require_once "app/contacts/app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); // populate phone_type_* values $sql = "update v_contact_phones set phone_type_voice = '1' "; diff --git a/app/contacts/contact_email_delete.php b/app/contacts/contact_email_delete.php index e417debd96..8345c46349 100644 --- a/app/contacts/contact_email_delete.php +++ b/app/contacts/contact_email_delete.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); if (count($_GET)>0) { $id = check_str($_GET["id"]); diff --git a/app/contacts/contact_email_edit.php b/app/contacts/contact_email_edit.php index 7a1f8ce8ad..3c93ece8c9 100644 --- a/app/contacts/contact_email_edit.php +++ b/app/contacts/contact_email_edit.php @@ -36,10 +36,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //action add or update if (isset($_REQUEST["id"])) { diff --git a/app/content/rsssearch.php b/app/content/rsssearch.php index a7ce11f84f..58ab6b71a0 100644 --- a/app/content/rsssearch.php +++ b/app/content/rsssearch.php @@ -39,10 +39,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); if (count($_POST)>0) { $rss_uuid = check_str($_POST["rss_uuid"]); diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index f1da6090d7..04ab88a0af 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //includes and title require_once "resources/header.php"; diff --git a/app/devices/device_settings.php b/app/devices/device_settings.php index 69f836cf2d..08a8a026bc 100644 --- a/app/devices/device_settings.php +++ b/app/devices/device_settings.php @@ -34,10 +34,9 @@ else { exit; } -require_once "app/devices/app_languages.php"; -foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } +//add multi-lingual support + $language = new text; + $text = $language->get(); require_once "resources/header.php"; require_once "resources/paging.php"; diff --git a/app/extensions/extensions.php b/app/extensions/extensions.php index 5a7cc98ed5..7662878213 100644 --- a/app/extensions/extensions.php +++ b/app/extensions/extensions.php @@ -35,10 +35,8 @@ else { } //add multi-lingual support - require_once "app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); require_once "resources/header.php"; $document['title'] = $text['title-extensions']; diff --git a/app/fax/fax_emails.php b/app/fax/fax_emails.php index 0f9ce3b772..3943e234d9 100644 --- a/app/fax/fax_emails.php +++ b/app/fax/fax_emails.php @@ -41,10 +41,6 @@ unset($sql, $prep_statement); if (sizeof($result) != 0) { - //load language file - require_once "app_languages.php"; - $text_original = $text; - //load default settings $default_settings = load_default_settings(); diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index bad55ea041..214f798af9 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -55,10 +55,8 @@ include "root.php"; } //add multi-lingual support - require_once "app/music_on_hold/app_languages.php"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } + $language = new text; + $text = $language->get(); //start the select $select = "