forked from Wavyzz/dolibarr
Update html.formfile.class.php
Corrects a bug that adds a second '?' in the url string. When strpos returns 0 as the initial position for '?', it is (mis)taken as FALSE value, and then replaced by a second '?' in the list of get parameters, resulting in something like: /compta/facture/card.php?facid=397?action=remove_file... instead of /compta/facture/card.php?facid=397&action=remove_file...
This commit is contained in:
@@ -859,7 +859,7 @@ class FormFile
|
||||
if ($delallowed)
|
||||
{
|
||||
$tmpurlsource = preg_replace('/#[a-zA-Z0-9_]*$/', '', $urlsource);
|
||||
$out .= '<a href="'.$tmpurlsource.(strpos($tmpurlsource, '?') ? '&' : '?').'action=remove_file&file='.urlencode($relativepath);
|
||||
$out .= '<a href="'.$tmpurlsource.((strpos($tmpurlsource, '?') === false) ? '?' : '&').'action=remove_file&file='.urlencode($relativepath);
|
||||
$out .= ($param ? '&'.$param : '');
|
||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||
|
||||
Reference in New Issue
Block a user