evaluation hint

This commit is contained in:
Roland Gruber 2016-10-25 19:50:46 +02:00
parent 70e3afc38e
commit 68bee45561
1 changed files with 7 additions and 2 deletions

View File

@ -44,8 +44,8 @@ include_once("../lib/selfService.inc");
include_once("../lib/config.inc"); include_once("../lib/config.inc");
if (isLAMProVersion()) { if (isLAMProVersion()) {
include_once("../lib/env.inc"); include_once("../lib/env.inc");
$validator = new \LAM\ENV\LAMLicenseValidator(); $licenseValidator = new \LAM\ENV\LAMLicenseValidator();
$validator->validateAndRedirect('config/mainlogin.php?invalidLicense=1', 'config/mainlogin.php?invalidLicense=2'); $licenseValidator->validateAndRedirect('config/mainlogin.php?invalidLicense=1', 'config/mainlogin.php?invalidLicense=2');
} }
/** Upgrade functions */ /** Upgrade functions */
@ -158,6 +158,7 @@ $_SESSION['header'] .= "<meta http-equiv=\"pragma\" content=\"no-cache\">\n <me
function display_LoginPage($config_object, $cfgMain) { function display_LoginPage($config_object, $cfgMain) {
logNewMessage(LOG_DEBUG, "Display login page"); logNewMessage(LOG_DEBUG, "Display login page");
global $error_message; global $error_message;
global $licenseValidator;
// generate 256 bit key and initialization vector for user/passwd-encryption // generate 256 bit key and initialization vector for user/passwd-encryption
// check if we can use /dev/urandom otherwise use rand() // check if we can use /dev/urandom otherwise use rand()
if(function_exists('mcrypt_create_iv') && ($cfgMain->encryptSession == 'true')) { if(function_exists('mcrypt_create_iv') && ($cfgMain->encryptSession == 'true')) {
@ -231,6 +232,10 @@ function display_LoginPage($config_object, $cfgMain) {
// copy any missing default profiles // copy any missing default profiles
copyConfigTemplates($profiles); copyConfigTemplates($profiles);
if (isLAMProVersion() && $licenseValidator->isEvaluationLicense()) {
StatusMessage('INFO', _('Evaluation Licence'));
}
// set focus on password field // set focus on password field
if (!empty($config_object)) { if (!empty($config_object)) {
echo "<script type=\"text/javascript\" language=\"javascript\">\n"; echo "<script type=\"text/javascript\" language=\"javascript\">\n";