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:
parent
8bcff9a0f1
commit
c083458adf
@ -859,7 +859,7 @@ class FormFile
|
|||||||
if ($delallowed)
|
if ($delallowed)
|
||||||
{
|
{
|
||||||
$tmpurlsource = preg_replace('/#[a-zA-Z0-9_]*$/', '', $urlsource);
|
$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 .= ($param ? '&'.$param : '');
|
||||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user