-
-
diff --git a/app/xmpp/profile_list.php b/app/xmpp/profile_list.php
index fce7773c44..46b07542e3 100644
--- a/app/xmpp/profile_list.php
+++ b/app/xmpp/profile_list.php
@@ -2,8 +2,8 @@
- XMPP Manager
- Utilizes the Jingle protocol. Jingle is an extension to the Jabber/XMPP protocol.
+ | =$text['header-xmpp']?>
+ =$text['description-xmpp-list']?>
|
@@ -11,14 +11,14 @@
- | Profile |
- Context |
- Status |
- Enabled |
- Description |
+ =$text['label-profile_name']?> |
+ =$text['label-context']?> |
+ =$text['label-status']?> |
+ =$text['label-enabled']?> |
+ =$text['label-description']?> |
-
+ '>
|
@@ -38,11 +38,11 @@ foreach($profiles_array as $profile){
|
- ' alt='edit'>
+ ' alt='=$text['button-edit']?>'>
- ' onclick="return confirm('Do you really want to delete this?')"
- alt='delete'>
+ ' onclick="return confirm('=$text['confirm-delete']?>')"
+ alt='=$text['button-delete']?>'>
|
@@ -53,7 +53,7 @@ if ($c==0) { $c=1; } else { $c=0; }
|
-
+ '>
|
diff --git a/app/xmpp/update_complete.php b/app/xmpp/update_complete.php
index b7af89cb9a..a7b080dff8 100644
--- a/app/xmpp/update_complete.php
+++ b/app/xmpp/update_complete.php
@@ -1,11 +1,10 @@
-
diff --git a/app/xmpp/xmpp.php b/app/xmpp/xmpp.php
index 3d15b9ef2e..0bb9ec4655 100644
--- a/app/xmpp/xmpp.php
+++ b/app/xmpp/xmpp.php
@@ -35,7 +35,16 @@ else {
echo "access denied";
exit;
}
+
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
require_once "includes/header.php";
+$page["title"] = $text['title-xmpp'];
+
require_once "includes/paging.php";
//connect to event socket
diff --git a/app/xmpp/xmpp_profile_edit.php b/app/xmpp/xmpp_profile_edit.php
index f844257472..4964c8ccb4 100644
--- a/app/xmpp/xmpp_profile_edit.php
+++ b/app/xmpp/xmpp_profile_edit.php
@@ -38,18 +38,30 @@ else {
exit;
}
-require_once "includes/header.php";
-
-$domain_name = $_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
//add or update the database
if (isset($_REQUEST["id"])) {
$action = "update";
$profile_id = check_str($_REQUEST["id"]);
-} else {
+} else {
$action = "add";
}
+require_once "includes/header.php";
+if ($action == "update") {
+ $page["title"] = $text['title-xmpp-edit'];
+}
+else if ($action == "add") {
+ $page["title"] = $text['title-xmpp-add'];
+}
+
+$domain_name = $_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'];
+
if ($action == "update") {
$sql = "";
$sql .= "select * from v_xmpp ";
@@ -83,9 +95,9 @@ if ($action == "update") {
$profile['local_network_acl'] = "localnet.auto";
}
-if ((!isset($_REQUEST['submit'])) || ($_REQUEST['submit'] != 'Save')) {
+if ((!isset($_REQUEST['submit'])) || ($_REQUEST['submit'] != $text['button-save'])) {
// If we arent saving a Profile Display the form.
- include "profile_edit.php";
+ include "profile_edit.php";
require_once "includes/footer.php";
exit;
}
@@ -94,16 +106,17 @@ foreach ($_REQUEST as $field => $data){
$request[$field] = check_str($data);
}
+
// check the data
$error = "";
-if (strlen($request['profile_name']) < 1) $error .= "Profile name is a Required Field \n";
-if (strlen($request['profile_username']) < 1) $error .= "Username is a Required Field \n";
-if (strlen($request['profile_password']) < 1) $error .= "Password is a Required Field \n";
-if (strlen($request['default_exten']) < 1) $error .= "Default Extension is a Required Field \n";
-if (strlen($error) > 0) {
+if (strlen($request['profile_name']) < 1) $error .= $text['message-required'].$text['label-profile_name']." \n";
+if (strlen($request['profile_username']) < 1) $error .= $text['message-required'].$text['label-username']." \n";
+if (strlen($request['profile_password']) < 1) $error .= $text['message-required'].$text['label-password']." \n";
+if (strlen($request['default_exten']) < 1) $error .= $text['message-required'].$text['label-default_exten']." \n";
+if (strlen($error) > 0) {
include "errors.php";
$profile = $request;
- include "profile_edit.php";
+ include "profile_edit.php";
require_once "includes/footer.php";
exit;
}
@@ -164,7 +177,7 @@ if ($action == "add" && permission_exists('xmpp_add')) {
$sql .= ") ";
$db->exec(check_sql($sql));
-}
+}
elseif ($action == "update" && permission_exists('xmpp_edit')) {
$sql = "";
$sql .= "UPDATE v_xmpp SET ";
@@ -195,7 +208,7 @@ elseif ($action == "update" && permission_exists('xmpp_edit')) {
$sql .= "where xmpp_profile_uuid = '" . $request['id'] . "' ";
$db->exec(check_sql($sql));
$xmpp_profile_uuid = $request['id'];
-}
+}
if ($request['enabled'] == "true") {
//prepare the xml
|