Fix to avoid infinite loop

This commit is contained in:
Laurent Destailleur 2017-10-22 21:21:24 +02:00
parent f4f47c6732
commit 7825cc9f6d

View File

@ -95,7 +95,9 @@ if ($action == 'builddoc' && $permissioncreate)
{ {
setEventMessages($langs->trans("FileGenerated"), null); setEventMessages($langs->trans("FileGenerated"), null);
header('Location: '.$_SERVER['REQUEST_URI'].'#builddoc'); $redirecturl = $_SERVER['REQUEST_URI'];
$redirecturl = preg_replace('/&?action=builddoc/', '', $redirecturl); // Remove action=builddoc parameter to avoid infinite loop
header('Location: '.$redirecturl.'#builddoc');
exit; exit;
} }
} }