diff --git a/login.php b/login.php index 3b9df5e4eb..b699185f9b 100755 --- a/login.php +++ b/login.php @@ -83,6 +83,7 @@ function show_cookie() { global $code, $last_loginid, $login; +//echo '$GLOBALS:
';print_r($GLOBALS);echo ''; /* This needs to be this way, because if someone doesnt want to use cookies, we shouldnt sneak one in */ if ($code != 5 && (isset($GLOBALS['phpgw_info']['server']['usecookies']) && $GLOBALS['phpgw_info']['server']['usecookies'])) { @@ -92,22 +93,24 @@ function check_logoutcode($code) { + $GLOBALS['phpgw']->template = CreateObject('phpgwapi.Template'); + $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); switch($code) { case 1: - return lang('You have been successfully logged out'); + return $GLOBALS['phpgw']->common->msgbox('You have been successfully logged out', True); break; case 2: - return lang('Sorry, your login has expired'); + return $GLOBALS['phpgw']->common->msgbox('Sorry, your login has expired', False); break; case 5: - return '' . lang('Bad login or password') . ''; + return $GLOBALS['phpgw']->common->msgbox('Bad login or password', False); break; case 10: Setcookie('sessionid'); Setcookie('kp3'); Setcookie('domain'); - return '' . lang('Your session could not be verified.') . ''; + return $GLOBALS['phpgw']->common->msgbox('Your session could not be verified.',False); break; default: return ' '; diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 3a7edd002b..6e0dfe574a 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -61,6 +61,11 @@ $this->set_root(PHPGW_TEMPLATE_DIR); $this->set_file('common', 'common.tpl'); } + else + { + $this->set_root(PHPGW_INCLUDE_ROOT.'/phpgwapi/templates/default'); + $this->set_file('common', 'common.tpl'); + } /* This covers setting the theme values so that each app doesnt have to */ $theme_data = $GLOBALS['phpgw_info']['theme'];