forked from modxcms/evolution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlang.php
More file actions
45 lines (37 loc) · 1.1 KB
/
Copy pathlang.php
File metadata and controls
45 lines (37 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Multilanguage functions for MODX Installer
*
* @author davaeron
* @package MODX
* @version 1.0
*
* Filename: /install/lang.php
*/
$_lang = array ();
#default fallback language file - english
require_once("lang/english.inc.php");
$install_language = "english";
if (isset($_POST['language']) && !stristr($_POST['language'],"..")) {
$install_language = $_POST['language'];
} else {
if (isset($_GET['language']) && !stristr($_GET['language'],".."))
$install_language = $_GET['language'];
}
$manager_language = "english";
if (isset($_POST['managerlanguage']) && !stristr($_POST['managerlanguage'],"..")) {
$manager_language = $_POST['managerlanguage'];
} else {
if (isset($_GET['managerlanguage']) && !stristr($_GET['managerlanguage'],".."))
$manager_language = $_GET['managerlanguage'];
}
# load language file
if($install_language!="english" && file_exists("lang/".$install_language.".inc.php")) {
include_once "lang/".$install_language.".inc.php";
}
foreach($_lang as $k=>$v)
{
if(strpos($v,'[+MGR_DIR+]')!==false)
$_lang[$k] = str_replace('[+MGR_DIR+]', MGR_DIR, $v);
}
?>