From b4dce58bf4cd7a2d345c8c4f9704c4efb9141107 Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Sun, 15 Oct 2006 20:07:02 +0000 Subject: [PATCH] fallback to idots template set when login template set does not have login.inc.php remove commented old tpl code --- login.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/login.php b/login.php index 6e02df273d..7b92f393d8 100755 --- a/login.php +++ b/login.php @@ -43,9 +43,14 @@ // read the images from the login-template-set, not the (maybe not even set) users template-set $GLOBALS['egw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['egw_info']['login_template_set']; - include($GLOBALS['egw_info']['server']['template_dir'].'/login.inc.php'); - - //$GLOBALS['egw_info']['server']['deny_all_logins']=true; + if(is_file($GLOBALS['egw_info']['server']['template_dir'].'/login.inc.php')) + { + include($GLOBALS['egw_info']['server']['template_dir'].'/login.inc.php'); + } + else + { + include(EGW_SERVER_ROOT . '/phpgwapi/templates/idots/login.inc.php'); + } // This is used for system downtime, to prevent new logins. if($GLOBALS['egw_info']['server']['deny_all_logins']) @@ -54,8 +59,6 @@ exit; } - //$tmpl->set_file(array('login_form' => 'login.tpl')); - function check_logoutcode($code) { switch($code) @@ -317,7 +320,7 @@ } if(lang('loginscreen_message') != 'loginscreen_message*') { - //$tmpl->set_var('lang_message',stripslashes(lang('loginscreen_message'))); + // for now store login message in globals so it is available for the login.inc.php $GLOBALS['loginscreenmessage']=stripslashes(lang('loginscreen_message')); } }