Эх сурвалжийг харах

Use the new multi-lingual code on misc files.

Nate Jones 10 жил өмнө
parent
commit
63b0466a50

+ 4 - 6
resources/classes/schema.php

@@ -446,20 +446,18 @@ include "root.php";
 
 		//datatase schema
 			public function schema ($format) {
-			
+
 				//set the global variable
 					global $db, $db_type, $db_name, $db_username, $db_password;
 					global $db_host, $db_path, $db_port, $upgrade_data_types, $text;
-				
+
 				//get the PROJECT PATH
 					include "root.php";
 
 				//add multi-lingual support
 					if (!isset($text)) {
-						require "core/upgrade/app_languages.php";
-						foreach($text as $key => $value) {
-							$text[$key] = $value[$_SESSION['domain']['language']['code']];
-						}
+						$language = new text;
+						$text = $language->get(null,'core/upgrade');
 					}
 
 				//PHP PDO check if table or column exists

+ 2 - 4
resources/login.php

@@ -25,10 +25,8 @@
 */
 
 //add multi-lingual support
-	require_once "core/user_settings/app_languages.php";
-	foreach($text as $key => $value) {
-		$text[$key] = $value[$_SESSION['domain']['language']['code']];
-	}
+	$language = new text;
+	$text = $language->get(null,'core/user_settings');
 
 //get action, if any
 	if (isset($_REQUEST['action'])) {

+ 2 - 4
themes/enhanced/template.php

@@ -1248,10 +1248,8 @@ legend {
 
 <?php
 //add multi-lingual support
-	require_once "themes/enhanced/app_languages.php";
-	foreach($text as $key => $value) {
-		$text[$key] = $value[$_SESSION['domain']['language']['code']];
-	}
+	$language = new text;
+	$text = $language->get(null,'themes/enhanced');
 
 // set message_onload
 if (strlen($_SESSION['message']) > 0) {

+ 2 - 4
themes/minimized/template.php

@@ -1262,10 +1262,8 @@ legend {
 
 <?php
 //add multi-lingual support
-	require_once "themes/minimized/app_languages.php";
-	foreach($text as $key => $value) {
-		$text[$key] = $value[$_SESSION['domain']['language']['code']];
-	}
+	$language = new text;
+	$text = $language->get(null,'themes/minimized');
 
 // set message_onload
 	if (strlen($_SESSION['message']) > 0) {