summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2009-03-25 15:39:58 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-03-25 12:27:14 -0400
commit55e8a6ca1b0af8e05a7ee22735585ef5ebd66fc6 (patch)
treeb72e288fa29201d731322a0d381cb977e6b87ea8 /lib/router.php
parentd92926f892d72b631ba7ec3447eb73caf9ff03bd (diff)
A different search pagination fix (see ticket #1333) that doesn't require fixing the upstream code, thus undoing the change made in d64be5108d69ff4068d4383ab121a3ba7388ada3
Merged.
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php
index e39dc217a..135e07a0f 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -429,6 +429,16 @@ class Router
$args = $action_arg;
}
- return $this->m->generate($args, $params, $fragment);
+ $url = $this->m->generate($args, $params, $fragment);
+
+ // Due to a bug in the Net_URL_Mapper code, the returned URL may
+ // contain a malformed query of the form ?p1=v1?p2=v2?p3=v3. We
+ // repair that here rather than modifying the upstream code...
+ $qpos = strpos($url,'?');
+ if ($qpos !== false) {
+ $url = substr($url, 0, $qpos+1) .
+ str_replace('?', '&', substr($url, $qpos+1));
+ }
+ return $url;
}
}