diff --git a/core/upgrade/app_languages.php b/core/upgrade/app_languages.php
new file mode 100644
index 0000000000..28f01ba456
--- /dev/null
+++ b/core/upgrade/app_languages.php
@@ -0,0 +1,25 @@
+
diff --git a/core/upgrade/upgrade.php b/core/upgrade/upgrade.php
index 36f9ca1024..549ee40ea5 100644
--- a/core/upgrade/upgrade.php
+++ b/core/upgrade/upgrade.php
@@ -33,6 +33,12 @@
require_once "includes/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
$display_type = 'text'; //html, text
+
+ //add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
}
else {
include "root.php";
@@ -45,6 +51,13 @@
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']];
+ }
+
}
//set the default
@@ -59,10 +72,10 @@
if ($display_type == 'text') {
echo "\n";
- echo "Upgrade\n";
+ echo $text['label-upgrade']."\n";
echo "-----------------------------------------\n";
echo "\n";
- echo "Database\n";
+ echo $text['label-database']."\n";
}
//upgrade the database schema
@@ -73,10 +86,10 @@ if ($display_type == 'text') {
echo "
\n";
echo "
\n";
echo "\n";
- echo "| Message | \n";
+ echo "".$text['header-message']." | \n";
echo "
\n";
echo "\n";
- echo "| Upgrade Completed | \n";
+ echo "".$text['message-upgrade']." | \n";
echo "
\n";
echo "
\n";
echo "
\n";
diff --git a/core/upgrade/upgrade_schema.php b/core/upgrade/upgrade_schema.php
index c330294ab7..bf4e1bc7f3 100644
--- a/core/upgrade/upgrade_schema.php
+++ b/core/upgrade/upgrade_schema.php
@@ -33,6 +33,12 @@
require_once "includes/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
$display_type = 'text'; //html, text
+
+ //add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
}
else {
include "root.php";
@@ -45,7 +51,16 @@
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-upgrade_schema'];
+
$display_type = 'html'; //html, text
}
diff --git a/includes/lib_schema.php b/includes/lib_schema.php
index 96def0f41d..013538164f 100644
--- a/includes/lib_schema.php
+++ b/includes/lib_schema.php
@@ -269,6 +269,7 @@ function db_insert_into ($apps, $db_type, $table) {
}
function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
+ global $text; // pulls in language variable array
global $display_type;
//PHP PDO check if table or column exists
@@ -514,7 +515,7 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
//display results as html
if ($display_results && $display_type == "html") {
//show the database type
- echo "Database Type: ".$db_type. "
";
+ echo "".$text['header-database_type'].": ".$db_type. "
";
//start the table
echo "\n";
//show the changes
@@ -522,7 +523,7 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
echo "\n";
echo "\n";
echo " \n";
- echo "SQL Changes: \n";
+ echo "".$text['label-sql_changes'].": \n";
echo "\n";
echo $sql_update;
echo " \n";
@@ -532,9 +533,9 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
}
//list all tables
echo " |
\n";
- echo "| Table | \n";
- echo "Exists | \n";
- echo "Details | \n";
+ echo "".$text['label-table']." | \n";
+ echo "".$text['label-exists']." | \n";
+ echo "".$text['label-details']." | \n";
echo "
\n";
//build the html while looping through the app db array
$sql = '';
@@ -550,17 +551,17 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
//check if the table exists
if ($row['exists'] == "true") {
- echo "table $table_name | \n";
- echo "true | \n";
+ echo "".$table_name." | \n";
+ echo "".$text['option-true']." | \n";
if (count($row['fields']) > 0) {
echo "\n";
//show the list of columns
echo "\n";
echo "\n";
- echo "| name | \n";
- echo "type | \n";
- echo "exists | \n";
+ echo "".$text['label-name']." | \n";
+ echo "".$text['label-type']." | \n";
+ echo "".$text['label-exists']." | \n";
echo " \n";
foreach ($row['fields'] as $field) {
if ($field['deprecated'] == "true") {
@@ -583,11 +584,11 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
echo "".$field_name." | \n";
echo "".$field_type." | \n";
if ($field['exists'] == "true") {
- echo "true | \n";
+ echo "".$text['option-true']." | \n";
echo " | \n";
}
else {
- echo "false | \n";
+ echo "".$text['option-false']." | \n";
echo " | \n";
}
echo "\n";
@@ -599,8 +600,8 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
}
}
else {
- echo "table $table_name | \n";
- echo "exists false | \n";
+ echo "$table_name | \n";
+ echo "".$text['label-exists']." ".$text['option-false']." | \n";
echo " | \n";
}
echo "\n";
@@ -615,11 +616,11 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
//loop line by line through all the lines of sql code
$x = 0;
if (strlen($sql_update) == 0 && $display_type == "text") {
- echo " Schema: no change\n";
+ echo " ".$text['label-schema'].": ".$text['label-no_change']."\n";
}
else {
if ($display_type == "text") {
- echo " Schema:\n";
+ echo " ".$text['label-schema'].":\n";
}
//$db->beginTransaction();
$update_array = explode(";", $sql_update);
|