diff --git a/app/settings/setting_edit.php b/app/settings/setting_edit.php
index d3818d392..1550e22cb 100644
--- a/app/settings/setting_edit.php
+++ b/app/settings/setting_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();
//get the number of rows in v_extensions
$sql = " select count(*) as num_rows from v_settings ";
diff --git a/app/sip_profiles/sip_profile_copy.php b/app/sip_profiles/sip_profile_copy.php
index 167194444..f317ddd97 100644
--- a/app/sip_profiles/sip_profile_copy.php
+++ b/app/sip_profiles/sip_profile_copy.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();
//set the http get/post variable(s) to a php variable
if (isset($_REQUEST["id"])) {
diff --git a/app/sip_profiles/sip_profile_delete.php b/app/sip_profiles/sip_profile_delete.php
index 547d8537e..70f2eb89f 100644
--- a/app/sip_profiles/sip_profile_delete.php
+++ b/app/sip_profiles/sip_profile_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/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php
index 700fc2eb7..a9eaf3b0b 100644
--- a/app/sip_profiles/sip_profile_edit.php
+++ b/app/sip_profiles/sip_profile_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/sip_profiles/sip_profile_setting_delete.php b/app/sip_profiles/sip_profile_setting_delete.php
index 1751045aa..2a660cfca 100644
--- a/app/sip_profiles/sip_profile_setting_delete.php
+++ b/app/sip_profiles/sip_profile_setting_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/sip_profiles/sip_profile_setting_edit.php b/app/sip_profiles/sip_profile_setting_edit.php
index 87c32dd0c..d478eac39 100644
--- a/app/sip_profiles/sip_profile_setting_edit.php
+++ b/app/sip_profiles/sip_profile_setting_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/sip_profiles/sip_profiles.php b/app/sip_profiles/sip_profiles.php
index 7ddcddd8f..81c3cb4a1 100644
--- a/app/sip_profiles/sip_profiles.php
+++ b/app/sip_profiles/sip_profiles.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-sip_profiles'];
diff --git a/app/sip_status/sip_status.php b/app/sip_status/sip_status.php
index 13e6ec584..96e3fd13e 100644
--- a/app/sip_status/sip_status.php
+++ b/app/sip_status/sip_status.php
@@ -38,10 +38,8 @@ else {
exit;
}
//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();
//define variables
$c = 0;
diff --git a/app/sql_query/sql_backup.php b/app/sql_query/sql_backup.php
index 8f1640f44..d213c8f91 100644
--- a/app/sql_query/sql_backup.php
+++ b/app/sql_query/sql_backup.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();
//pdo database connection
if (strlen($_REQUEST['id']) > 0) {
@@ -81,7 +79,7 @@ else {
}
return $result;
}
-
+
//set the headers
header('Content-type: application/octet-binary');
header('Content-Disposition: attachment; filename=database_backup.sql');
diff --git a/app/sql_query/sql_db_conversion.php b/app/sql_query/sql_db_conversion.php
index d76c2b0a9..6863d78f5 100644
--- a/app/sql_query/sql_db_conversion.php
+++ b/app/sql_query/sql_db_conversion.php
@@ -37,10 +37,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();
//show errors
ini_set('display_errors', '1');
diff --git a/app/sql_query/sql_query.php b/app/sql_query/sql_query.php
index ec4ee5314..45f08dd28 100644
--- a/app/sql_query/sql_query.php
+++ b/app/sql_query/sql_query.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();
//show the header
require_once "resources/header.php";
diff --git a/app/sql_query/sql_query_db.php b/app/sql_query/sql_query_db.php
index 17b2300c2..3cf284e4d 100644
--- a/app/sql_query/sql_query_db.php
+++ b/app/sql_query/sql_query_db.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-databases'];
diff --git a/app/sql_query/sql_query_result.php b/app/sql_query/sql_query_result.php
index 46e62605d..a7dfbc9ee 100644
--- a/app/sql_query/sql_query_result.php
+++ b/app/sql_query/sql_query_result.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();
//pdo database connection
if (strlen($_REQUEST['id']) > 0) {
diff --git a/app/system/system.php b/app/system/system.php
index 8e4f3ea0e..960b37c07 100644
--- a/app/system/system.php
+++ b/app/system/system.php
@@ -39,10 +39,9 @@ else {
exit;
}
//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";
echo "
";
diff --git a/app/time_conditions/time_condition_add.php b/app/time_conditions/time_condition_add.php
index 8aed56b67..27dd0cb8d 100644
--- a/app/time_conditions/time_condition_add.php
+++ b/app/time_conditions/time_condition_add.php
@@ -37,10 +37,8 @@ require_once "resources/header.php";
require_once "resources/paging.php";
//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();
//set the variables
$order_by = check_str($_GET["order_by"]);
diff --git a/app/traffic_graph/status_graph.php b/app/traffic_graph/status_graph.php
index 403b6edf2..ac9daf584 100644
--- a/app/traffic_graph/status_graph.php
+++ b/app/traffic_graph/status_graph.php
@@ -44,10 +44,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 ($_REQUEST['interface']) {
$interface = $_REQUEST['interface'];
diff --git a/app/vars/var_delete.php b/app/vars/var_delete.php
index e47c76bfb..0cf585f2d 100644
--- a/app/vars/var_delete.php
+++ b/app/vars/var_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();
//get the id
if (count($_GET) > 0) {
diff --git a/app/vars/var_edit.php b/app/vars/var_edit.php
index 95b341a55..9f72343b5 100644
--- a/app/vars/var_edit.php
+++ b/app/vars/var_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();
//set the action as an add or an update
if (isset($_REQUEST["id"])) {
diff --git a/app/vars/vars.php b/app/vars/vars.php
index 764680f92..b6eef31c0 100644
--- a/app/vars/vars.php
+++ b/app/vars/vars.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();
//include the header
require_once "resources/header.php";
diff --git a/app/vars/vars_textarea.php b/app/vars/vars_textarea.php
index cc849aa95..872b59515 100644
--- a/app/vars/vars_textarea.php
+++ b/app/vars/vars_textarea.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();
//include the header
require_once "resources/header.php";
diff --git a/app/voicemail_greetings/voicemail_greeting_delete.php b/app/voicemail_greetings/voicemail_greeting_delete.php
index e33827604..20e206f5e 100644
--- a/app/voicemail_greetings/voicemail_greeting_delete.php
+++ b/app/voicemail_greetings/voicemail_greeting_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/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php
index 3d3b3f60e..1e476e1a0 100644
--- a/app/voicemail_greetings/voicemail_greeting_edit.php
+++ b/app/voicemail_greetings/voicemail_greeting_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();
//set the action as an add or an update
if (isset($_REQUEST["id"])) {
diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php
index 2a19b52bd..2b5f5b491 100644
--- a/app/voicemail_greetings/voicemail_greetings.php
+++ b/app/voicemail_greetings/voicemail_greetings.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();
//additional includes
require_once "resources/paging.php";
diff --git a/app/voicemails/voicemail_delete.php b/app/voicemails/voicemail_delete.php
index 3f9917b84..96d0e6185 100644
--- a/app/voicemails/voicemail_delete.php
+++ b/app/voicemails/voicemail_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();
//get the id
if (count($_GET)>0) {
diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php
index 65162dd20..4246b4c13 100644
--- a/app/voicemails/voicemail_edit.php
+++ b/app/voicemails/voicemail_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"])) {
@@ -90,7 +88,7 @@ else {
$voicemail_uuid_copy = check_str($_REQUEST["voicemail_uuid_copy"]);
//assign the user to the extension
$sqli = "
- insert into
+ insert into
v_voicemail_destinations
(
domain_uuid,
diff --git a/app/voicemails/voicemail_message_delete.php b/app/voicemails/voicemail_message_delete.php
index 682822902..31e063704 100644
--- a/app/voicemails/voicemail_message_delete.php
+++ b/app/voicemails/voicemail_message_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();
//get the HTTP values and set them as variables
if (count($_GET)>0) {
diff --git a/app/voicemails/voicemail_message_edit.php b/app/voicemails/voicemail_message_edit.php
index a1b0adf2d..7679efba2 100644
--- a/app/voicemails/voicemail_message_edit.php
+++ b/app/voicemails/voicemail_message_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/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php
index 91f937f27..a534c5c0f 100644
--- a/app/voicemails/voicemail_messages.php
+++ b/app/voicemails/voicemail_messages.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();
//set the voicemail_uuid
if (strlen($_REQUEST["id"]) > 0) {
diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php
index 472ab72da..c8f165c4c 100644
--- a/app/voicemails/voicemails.php
+++ b/app/voicemails/voicemails.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();
//set the voicemail_id array
foreach ($_SESSION['user']['extension'] as $row) {
diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php
index 9e24feed9..31e649684 100644
--- a/app/xml_cdr/xml_cdr.php
+++ b/app/xml_cdr/xml_cdr.php
@@ -37,10 +37,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();
//import xml_cdr files
require_once "v_xml_cdr_import.php";
diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php
index 0c916443c..0822ca128 100644
--- a/app/xml_cdr/xml_cdr_details.php
+++ b/app/xml_cdr/xml_cdr_details.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();
//get the http values and set them to a variable
if (strlen($_REQUEST["uuid"]) > 0) {
diff --git a/app/xml_cdr/xml_cdr_export.php b/app/xml_cdr/xml_cdr_export.php
index 2b854345c..e8b23e088 100644
--- a/app/xml_cdr/xml_cdr_export.php
+++ b/app/xml_cdr/xml_cdr_export.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();
//additional includes
$rows_per_page = 0;
diff --git a/app/xml_cdr/xml_cdr_extension_summary.php b/app/xml_cdr/xml_cdr_extension_summary.php
index 84563568b..2d384c2de 100644
--- a/app/xml_cdr/xml_cdr_extension_summary.php
+++ b/app/xml_cdr/xml_cdr_extension_summary.php
@@ -117,7 +117,7 @@ require_once "resources/require.php";
}
if ($row['hangup_cause'] == "NO_ANSWER") {
$summary[$row['destination_number']]['no_answer']++;
- }
+ }
if ($row['hangup_cause'] == "USER_BUSY") {
$summary[$row['destination_number']]['busy']++;
}
@@ -126,10 +126,8 @@ require_once "resources/require.php";
unset ($sql, $prep_statement, $result, $row_count);
//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();
//additional includes
require_once "resources/header.php";
@@ -228,7 +226,7 @@ require_once "resources/require.php";
echo "