fix problem if no profile exists
This commit is contained in:
parent
dba2d5e104
commit
ec77917a9e
|
@ -84,7 +84,12 @@ elseif (!empty($default_Profile)) {
|
|||
$_SESSION["config"] = new LAMConfig($default_Profile); // Create new Config object
|
||||
}
|
||||
|
||||
if (!empty($_SESSION["config"])) {
|
||||
$_SESSION['language'] = $_SESSION["config"]->get_defaultLanguage();
|
||||
}
|
||||
else {
|
||||
$_SESSION['language'] = 'en_GB.utf8:UTF-8:English (Great Britain)';
|
||||
}
|
||||
if (isset($_POST['language'])) {
|
||||
$_SESSION['language'] = $_POST['language']; // Write selected language in session
|
||||
}
|
||||
|
@ -94,7 +99,6 @@ $_SESSION['header'] .= "<html>\n<head>\n";
|
|||
$_SESSION['header'] .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $current_language[1] . "\">\n";
|
||||
$_SESSION['header'] .= "<meta http-equiv=\"pragma\" content=\"no-cache\">\n <meta http-equiv=\"cache-control\" content=\"no-cache\">";
|
||||
|
||||
|
||||
/**
|
||||
* Displays the login window.
|
||||
*
|
||||
|
@ -246,6 +250,7 @@ function display_LoginPage($config_object) {
|
|||
<br><br>
|
||||
|
||||
<?php
|
||||
if (!empty($config_object)) {
|
||||
// check extensions
|
||||
$extList = getRequiredExtensions();
|
||||
for ($i = 0; $i < sizeof($extList); $i++) {
|
||||
|
@ -255,7 +260,6 @@ function display_LoginPage($config_object) {
|
|||
}
|
||||
}
|
||||
// check TLS
|
||||
if (!empty($config_object)) {
|
||||
$useTLS = $config_object->getUseTLS();
|
||||
if (isset($useTLS) && ($useTLS == "yes")) {
|
||||
if (!function_exists('ldap_start_tls')) {
|
||||
|
|
Loading…
Reference in New Issue