Skip to content

Commit

Permalink
Add message on disconnect button when using an authentication mode where
Browse files Browse the repository at this point in the history
disconnect has no sense.
  • Loading branch information
eldy committed Apr 23, 2014
1 parent c1e349d commit caf6712
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions htdocs/langs/en_US/main.lang
Expand Up @@ -206,6 +206,7 @@ Limit=Limit
Limits=Limits
DevelopmentTeam=Development Team
Logout=Logout
NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode <b>%s</b>
Connection=Connection
Setup=Setup
Alert=Alert
Expand Down
7 changes: 4 additions & 3 deletions htdocs/main.inc.php
Expand Up @@ -1430,18 +1430,19 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Link info
$logouttext='';
$logouthtmltext=$appli.'<br>';
$logouthtmltext.=$langs->trans("Logout").'<br>';
//$logouthtmltext.="<br>";
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
$logouthtmltext.=$langs->trans("Logout").'<br>';

$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
//$logouttext .=empty($atarget?(' target="'.$atarget.'"'):'';
$logouttext .='>';
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
$logouttext .='</a>';
}
else
{
$logouthtmltext.=$langs->trans("NoLogoutProcessWithAuthMode",$_SESSION["dol_authmode"]);
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
}

Expand Down

0 comments on commit caf6712

Please sign in to comment.