mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
Fix Lang function again
This commit is contained in:
parent
2522f3112e
commit
b1919555e5
6 changed files with 77 additions and 32 deletions
25
init.php
25
init.php
|
@ -143,23 +143,16 @@ if (!empty($_SESSION['user_language'])) {
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($_SESSION['Lang'])) {
|
||||
if (empty($config['language'])) {
|
||||
$config['language'] = 'english';
|
||||
}
|
||||
$lan_file = $root_path . File::pathFixer('system/lan/' . $config['language'] . '.json');
|
||||
if (file_exists($lan_file)) {
|
||||
$_L = json_decode(file_get_contents($lan_file), true);
|
||||
$_SESSION['Lang'] = $_L;
|
||||
} else {
|
||||
$_L['author'] = 'Auto Generated by iBNuX Script';
|
||||
$_SESSION['Lang'] = $_L;
|
||||
file_put_contents($lan_file, json_encode($_L));
|
||||
}
|
||||
} else {
|
||||
$_L = $_SESSION['Lang'];
|
||||
if (empty($config['language'])) {
|
||||
$config['language'] = 'english';
|
||||
}
|
||||
$lan_file = $root_path . File::pathFixer('system/lan/' . $config['language'] . '.json');
|
||||
if (file_exists($lan_file)) {
|
||||
$_L = json_decode(file_get_contents($lan_file), true);
|
||||
} else {
|
||||
$_L['author'] = 'Auto Generated by iBNuX Script';
|
||||
file_put_contents($lan_file, json_encode($_L));
|
||||
}
|
||||
|
||||
|
||||
function safedata($value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue