mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
only require language if non-empty
This commit is contained in:
parent
01c8b14a44
commit
5d74ff4cc7
@ -57,8 +57,12 @@ spl_autoload_register('postfixadmin_autoload');
|
||||
if (!is_file("$incpath/config.inc.php")) {
|
||||
die("config.inc.php is missing!");
|
||||
}
|
||||
|
||||
global $CONF;
|
||||
|
||||
require_once("$incpath/config.inc.php");
|
||||
|
||||
|
||||
if (isset($CONF['configured'])) {
|
||||
if ($CONF['configured'] == false) {
|
||||
die("Please edit config.local.php - change \$CONF['configured'] to true after setting your database settings");
|
||||
@ -79,8 +83,9 @@ if (defined('POSTFIXADMIN_CLI')) {
|
||||
$language = check_language(); # TODO: storing the language only at login instead of calling check_language() on every page would save some processor cycles ;-)
|
||||
$_SESSION['lang'] = $language;
|
||||
}
|
||||
|
||||
require_once("$incpath/languages/" . $language . ".lang");
|
||||
if(!empty($language)) {
|
||||
require_once("$incpath/languages/" . $language . ".lang");
|
||||
}
|
||||
|
||||
if (!empty($CONF['language_hook']) && function_exists($CONF['language_hook'])) {
|
||||
$hook_func = $CONF['language_hook'];
|
||||
|
Loading…
Reference in New Issue
Block a user