From: CiaranG Date: Sat, 21 Mar 2009 14:24:19 +0000 (+0000) Subject: Fix to Net_URL_Mapper to make search pagination work. See Ticket #1333 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d64be5108d69ff4068d4383ab121a3ba7388ada3;p=quix0rs-gnu-social.git Fix to Net_URL_Mapper to make search pagination work. See Ticket #1333 --- diff --git a/extlib/Net/URL/Mapper/Path.php b/extlib/Net/URL/Mapper/Path.php index b541002c7a..eb1c34a3fa 100644 --- a/extlib/Net/URL/Mapper/Path.php +++ b/extlib/Net/URL/Mapper/Path.php @@ -241,7 +241,12 @@ class Net_URL_Mapper_Path } $path = '/'.trim(Net_URL::resolvePath($path), '/'); if (!empty($qstring)) { - $path .= '?'.http_build_query($qstring); + if (!strpos($path, '?')) { + $path .= '?'; + } else { + $path .= '&'; + } + $path .= http_build_query($qstring); } if (!empty($anchor)) { $path .= '#'.ltrim($anchor, '#'); @@ -427,4 +432,4 @@ class Net_URL_Mapper_Path } -?> \ No newline at end of file +?>