Fix: bad url

This commit is contained in:
Laurent Destailleur 2013-04-10 23:11:21 +02:00
parent 3bcd506e73
commit d570aa02d4

View File

@ -218,8 +218,7 @@ if (GETPOST("action") == 'gotodemo')
// Do redirect to login page // Do redirect to login page
if ($disablestring) if ($disablestring)
{ {
$url=DOL_URL_ROOT.'/index.php?disablemodules='.$disablestring; $url=DOL_URL_ROOT.'/index.php?'.(GETPOST('urlfrom','alpha')?'urlfrom='.urlencode(GETPOST('urlfrom','alpha')).'&':'').'disablemodules='.$disablestring;
if (GETPOST('urlfrom','alpha')) $url.='&urlfrom='.GETPOST('urlfrom','alpha');
header("Location: ".$url); header("Location: ".$url);
exit; exit;
} }