diff --git a/app/backup/index.php b/app/backup/index.php
index 1df13834a9..fb31d009c2 100644
--- a/app/backup/index.php
+++ b/app/backup/index.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();
//download the backup
if ($_GET['a'] == "download" && permission_exists('backup_download')) {
diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php
index b36c3c4a44..a489412e2e 100644
--- a/app/call_block/call_block.php
+++ b/app/call_block/call_block.php
@@ -39,10 +39,8 @@ require_once "resources/require.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();
//additional includes
require_once "resources/header.php";
diff --git a/app/call_block/call_block_cdr_add.php b/app/call_block/call_block_cdr_add.php
index d4067dfe09..4f46cd6af5 100644
--- a/app/call_block/call_block_cdr_add.php
+++ b/app/call_block/call_block_cdr_add.php
@@ -38,10 +38,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 from cdr
if (isset($_REQUEST["cdr_id"])) {
diff --git a/app/call_block/call_block_delete.php b/app/call_block/call_block_delete.php
index 8eee612c93..a52b56e142 100644
--- a/app/call_block/call_block_delete.php
+++ b/app/call_block/call_block_delete.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();
//set the variable
if (count($_GET)>0) {
diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php
index 0aec8763c1..6c80688e8a 100644
--- a/app/call_block/call_block_edit.php
+++ b/app/call_block/call_block_edit.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();
//define the call_block_get_extensions function
function call_block_get_extensions($select_extension) {
diff --git a/app/call_broadcast/call_broadcast.php b/app/call_broadcast/call_broadcast.php
index 0cfb6652f1..ceffb50b1b 100644
--- a/app/call_broadcast/call_broadcast.php
+++ b/app/call_broadcast/call_broadcast.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();
//add the includes
require_once "resources/header.php";
diff --git a/app/call_broadcast/call_broadcast_delete.php b/app/call_broadcast/call_broadcast_delete.php
index 914574a686..0f362f42e1 100644
--- a/app/call_broadcast/call_broadcast_delete.php
+++ b/app/call_broadcast/call_broadcast_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/call_broadcast/call_broadcast_edit.php b/app/call_broadcast/call_broadcast_edit.php
index e1987b7c3c..029ab834c4 100644
--- a/app/call_broadcast/call_broadcast_edit.php
+++ b/app/call_broadcast/call_broadcast_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();
//set the action with add or update
if (isset($_REQUEST["id"])) {
diff --git a/app/call_broadcast/call_broadcast_send.php b/app/call_broadcast/call_broadcast_send.php
index 9269dfb26f..4b7df2a84f 100644
--- a/app/call_broadcast/call_broadcast_send.php
+++ b/app/call_broadcast/call_broadcast_send.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();
//set the max execution time to 1 hour
ini_set(max_execution_time,3600);
diff --git a/app/call_broadcast/call_broadcast_stop.php b/app/call_broadcast/call_broadcast_stop.php
index 5945497a55..ab8a4dafbb 100644
--- a/app/call_broadcast/call_broadcast_stop.php
+++ b/app/call_broadcast/call_broadcast_stop.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 html values and set them as variables
if (count($_GET)>0) {
diff --git a/app/call_center/call_center_agent_delete.php b/app/call_center/call_center_agent_delete.php
index 7e6f0f7180..19714e3d81 100644
--- a/app/call_center/call_center_agent_delete.php
+++ b/app/call_center/call_center_agent_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_center/call_center_agent_edit.php b/app/call_center/call_center_agent_edit.php
index 1414a6b1ad..a70813916f 100644
--- a/app/call_center/call_center_agent_edit.php
+++ b/app/call_center/call_center_agent_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/call_center/call_center_agent_status.php b/app/call_center/call_center_agent_status.php
index bfe61caee3..f966be5c95 100644
--- a/app/call_center/call_center_agent_status.php
+++ b/app/call_center/call_center_agent_status.php
@@ -35,15 +35,13 @@ 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_center_agent_status'];
-
-require_once "resources/paging.php";
+//includes and title
+ require_once "resources/header.php";
+ $document['title'] = $text['title-call_center_agent_status'];
+ require_once "resources/paging.php";
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
diff --git a/app/call_center/call_center_agents.php b/app/call_center/call_center_agents.php
index 2c1aa6cb70..ba2db21135 100644
--- a/app/call_center/call_center_agents.php
+++ b/app/call_center/call_center_agents.php
@@ -35,15 +35,13 @@ 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_center_agents'];
-
-require_once "resources/paging.php";
+//includes and title
+ require_once "resources/header.php";
+ $document['title'] = $text['title-call_center_agents'];
+ require_once "resources/paging.php";
//get http values and set them to php variables
$order_by = $_GET["order_by"];
diff --git a/app/call_center/call_center_queue_delete.php b/app/call_center/call_center_queue_delete.php
index 41039759d4..529e8e13a6 100644
--- a/app/call_center/call_center_queue_delete.php
+++ b/app/call_center/call_center_queue_delete.php
@@ -35,14 +35,13 @@ 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"]);
-}
+//get the id
+ if (count($_GET) > 0) {
+ $id = check_str($_GET["id"]);
+ }
if (strlen($id) > 0) {
diff --git a/app/call_center/call_center_queue_edit.php b/app/call_center/call_center_queue_edit.php
index 110bb3c532..fdb489376d 100644
--- a/app/call_center/call_center_queue_edit.php
+++ b/app/call_center/call_center_queue_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/call_center/call_center_queues.php b/app/call_center/call_center_queues.php
index 3308405f8f..243399f828 100644
--- a/app/call_center/call_center_queues.php
+++ b/app/call_center/call_center_queues.php
@@ -35,15 +35,13 @@ 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_center_queues'];
-
-require_once "resources/paging.php";
+//includes and title
+ require_once "resources/header.php";
+ $document['title'] = $text['title-call_center_queues'];
+ require_once "resources/paging.php";
//get http variables and set as php variables
$order_by = $_GET["order_by"];
diff --git a/app/call_center/call_center_tier_edit.php b/app/call_center/call_center_tier_edit.php
index 4ab43e3492..248979dfe3 100644
--- a/app/call_center/call_center_tier_edit.php
+++ b/app/call_center/call_center_tier_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 tier uuid
$call_center_tier_uuid = check_str($_REQUEST["id"]);
diff --git a/app/call_center_active/call_center_active_inc.php b/app/call_center_active/call_center_active_inc.php
index 3771ca5781..cf4904454f 100644
--- a/app/call_center_active/call_center_active_inc.php
+++ b/app/call_center_active/call_center_active_inc.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 queue_name and set it as a variable
$queue_name = $_GET[queue_name].'@'. $_SESSION['domains'][$domain_uuid]['domain_name'];
diff --git a/app/call_center_active/call_center_queue.php b/app/call_center_active/call_center_queue.php
index 8deb4f3ab8..106cc0e555 100644
--- a/app/call_center_active/call_center_queue.php
+++ b/app/call_center_active/call_center_queue.php
@@ -35,18 +35,17 @@ 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-active_call_center'];
+//includes and title
+ require_once "resources/header.php";
+ $document['title'] = $text['title-active_call_center'];
+ require_once "resources/paging.php";
-require_once "resources/paging.php";
-
-$order_by = $_GET["order_by"];
-$order = $_GET["order"];
+//get the variables
+ $order_by = $_GET["order_by"];
+ $order = $_GET["order"];
//show the content
echo "
\n";
diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php
index 4e2d7f77fc..44bac7ca3a 100644
--- a/app/calls/call_edit.php
+++ b/app/calls/call_edit.php
@@ -26,7 +26,6 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
-require_once "app_languages.php";
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
@@ -36,9 +35,8 @@ else {
}
//add multi-lingual support
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
+ $language = new text;
+ $text = $language->get();
//define the destination_select function
function destination_select($select_name, $select_value, $select_default) {
diff --git a/app/calls/calls.php b/app/calls/calls.php
index f8777e1b84..87b9cb2e20 100644
--- a/app/calls/calls.php
+++ b/app/calls/calls.php
@@ -39,11 +39,8 @@ else {
$order = check_str($_GET["order"]);
//add multi-lingual support
- unset($text);
- require_once "app/calls/app_languages.php";
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
+ $language = new text;
+ $text = $language->get();
//begin the content
require_once "resources/header.php";
diff --git a/app/calls_active/calls_active.php b/app/calls_active/calls_active.php
index 16876036f0..69e4d661e1 100644
--- a/app/calls_active/calls_active.php
+++ b/app/calls_active/calls_active.php
@@ -34,16 +34,13 @@ else {
echo "access denied";
exit;
}
-
//add multi-lingual support
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
+ $language = new text;
+ $text = $language->get();
$conference_name = trim($_REQUEST["c"]);
$tmp_conference_name = str_replace("_", " ", $conference_name);
-
require_once "resources/header.php";
$document['title'] = $text['title'];
diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php
index 1c7cdc76d5..fb260e1322 100644
--- a/app/calls_active/calls_active_inc.php
+++ b/app/calls_active/calls_active_inc.php
@@ -36,9 +36,8 @@ else {
}
//add multi-lingual support
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
+ $language = new text;
+ $text = $language->get();
//set the command
$switch_cmd = 'show channels as json';
diff --git a/app/click_to_call/click_to_call.php b/app/click_to_call/click_to_call.php
index df94e3d487..f0cea66651 100644
--- a/app/click_to_call/click_to_call.php
+++ b/app/click_to_call/click_to_call.php
@@ -42,12 +42,11 @@ 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";
+//include the header
+ require_once "resources/header.php";
if (is_array($_REQUEST) && !empty($_REQUEST['src']) && !empty($_REQUEST['dest'])) {
//get the http variables and set them as variables
diff --git a/app/conference_centers/conference_center_delete.php b/app/conference_centers/conference_center_delete.php
index 000a41e072..e3a41620a4 100644
--- a/app/conference_centers/conference_center_delete.php
+++ b/app/conference_centers/conference_center_delete.php
@@ -35,63 +35,63 @@ 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) {
+ $id = check_str($_GET["id"]);
}
-if (count($_GET)>0) {
- $id = check_str($_GET["id"]);
-}
+//delete the records
+ if (strlen($id) > 0) {
-if (strlen($id)>0) {
+ //get the dialplan uuid
+ $sql = "select * from v_conference_centers ";
+ $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "and conference_center_uuid = '$id' ";
+ $prep_statement = $db->prepare($sql);
+ $prep_statement->execute();
+ while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) {
+ $dialplan_uuid = $row['dialplan_uuid'];
+ }
- //get the dialplan uuid
- $sql = "select * from v_conference_centers ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
- $sql .= "and conference_center_uuid = '$id' ";
- $prep_statement = $db->prepare($sql);
- $prep_statement->execute();
- while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) {
- $dialplan_uuid = $row['dialplan_uuid'];
- }
+ //delete the conference center
+ $sql = "delete from v_conference_centers ";
+ $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "and conference_center_uuid = '$id' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ unset($sql);
- //delete the conference center
- $sql = "delete from v_conference_centers ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
- $sql .= "and conference_center_uuid = '$id' ";
- $prep_statement = $db->prepare(check_sql($sql));
- $prep_statement->execute();
- unset($sql);
+ //delete the dialplan entry
+ $sql = "delete from v_dialplans ";
+ $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
+ $db->query($sql);
+ unset($sql);
- //delete the dialplan entry
- $sql = "delete from v_dialplans ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
- $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
- $db->query($sql);
- unset($sql);
+ //delete the dialplan details
+ $sql = "delete from v_dialplan_details ";
+ $sql .= "where domain_uuid = '$domain_uuid' ";
+ $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
+ $db->query($sql);
+ unset($sql);
- //delete the dialplan details
- $sql = "delete from v_dialplan_details ";
- $sql .= "where domain_uuid = '$domain_uuid' ";
- $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
- $db->query($sql);
- unset($sql);
+ //clear the cache
+ $cache = new cache;
+ $cache->delete("dialplan:".$_SESSION["context"]);
- //clear the cache
- $cache = new cache;
- $cache->delete("dialplan:".$_SESSION["context"]);
+ //syncrhonize configuration
+ save_dialplan_xml();
- //syncrhonize configuration
- save_dialplan_xml();
+ //apply settings reminder
+ $_SESSION["reload_xml"] = true;
+ }
- //apply settings reminder
- $_SESSION["reload_xml"] = true;
-}
-
-
-$_SESSION["message"] = $text['message-delete'];
-header("Location: conference_centers.php");
-return;
+//redirect the browser
+ $_SESSION["message"] = $text['message-delete'];
+ header("Location: conference_centers.php");
+ return;
?>
\ No newline at end of file
diff --git a/app/conference_centers/conference_center_edit.php b/app/conference_centers/conference_center_edit.php
index 3eee468708..352878f959 100644
--- a/app/conference_centers/conference_center_edit.php
+++ b/app/conference_centers/conference_center_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/conference_centers/conference_centers.php b/app/conference_centers/conference_centers.php
index 9d4e564fc1..c4e77e3b80 100644
--- a/app/conference_centers/conference_centers.php
+++ b/app/conference_centers/conference_centers.php
@@ -41,10 +41,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/header.php";
diff --git a/app/conference_centers/conference_room_delete.php b/app/conference_centers/conference_room_delete.php
index fb7b724316..af2a62ba17 100644
--- a/app/conference_centers/conference_room_delete.php
+++ b/app/conference_centers/conference_room_delete.php
@@ -35,14 +35,13 @@ 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"]);
-}
+//get the id
+ if (count($_GET)>0) {
+ $id = check_str($_GET["id"]);
+ }
if (strlen($id)>0) {
//get the meeting_uuid
diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php
index ee84b42110..a98721c007 100644
--- a/app/conference_centers/conference_room_edit.php
+++ b/app/conference_centers/conference_room_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/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php
index 211c376532..1efa3d84fc 100644
--- a/app/conference_centers/conference_rooms.php
+++ b/app/conference_centers/conference_rooms.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/header.php";
diff --git a/app/conference_centers/conference_session_details.php b/app/conference_centers/conference_session_details.php
index 1e0bf636b6..136810e291 100644
--- a/app/conference_centers/conference_session_details.php
+++ b/app/conference_centers/conference_session_details.php
@@ -34,10 +34,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/header.php";
diff --git a/app/conference_centers/conference_sessions.php b/app/conference_centers/conference_sessions.php
index b61d2ec66e..d16ff58f2b 100644
--- a/app/conference_centers/conference_sessions.php
+++ b/app/conference_centers/conference_sessions.php
@@ -34,10 +34,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/header.php";
diff --git a/app/conferences/conference_delete.php b/app/conferences/conference_delete.php
index 52227583b5..2e2b8cf770 100644
--- a/app/conferences/conference_delete.php
+++ b/app/conferences/conference_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/conferences/conference_edit.php b/app/conferences/conference_edit.php
index 19c3dd698d..693cec3a56 100644
--- a/app/conferences/conference_edit.php
+++ b/app/conferences/conference_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/conferences/conferences.php b/app/conferences/conferences.php
index 868dd23b47..ad1f20a2f5 100644
--- a/app/conferences/conferences.php
+++ b/app/conferences/conferences.php
@@ -35,13 +35,12 @@ else {
}
//add multi-lingual support
- require_once "app_languages.php";
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
-
-require_once "resources/header.php";
-require_once "resources/paging.php";
+ $language = new text;
+ $text = $language->get();
+
+//includes
+ require_once "resources/header.php";
+ require_once "resources/paging.php";
//get variables used to control the order
$order_by = $_GET["order_by"];
diff --git a/app/conferences_active/conference_interactive.php b/app/conferences_active/conference_interactive.php
index 67d5fa2a75..003033eda0 100644
--- a/app/conferences_active/conference_interactive.php
+++ b/app/conferences_active/conference_interactive.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 and prepare the conference name
$conference_name = check_str(trim($_REQUEST["c"]));
diff --git a/app/conferences_active/conference_interactive_inc.php b/app/conferences_active/conference_interactive_inc.php
index 13fdd2b948..d61b0dad3b 100644
--- a/app/conferences_active/conference_interactive_inc.php
+++ b/app/conferences_active/conference_interactive_inc.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 get or post and set it as php variables
$conference_uuid = check_str($_REQUEST["c"]);
diff --git a/app/conferences_active/conferences_active.php b/app/conferences_active/conferences_active.php
index efe9e86557..f9c89b0042 100644
--- a/app/conferences_active/conferences_active.php
+++ b/app/conferences_active/conferences_active.php
@@ -36,11 +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();
require_once "resources/header.php";
?>