mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
use .http_build_query() instead of own buggy code
This commit is contained in:
parent
55dd783882
commit
9d5c4a784f
|
@ -812,23 +812,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
// regular expression to strip out the pg (page number) variable to
|
||||
// achieve the same effect. This seems to be less haphazard though...
|
||||
$resultsURI = $baseURI;
|
||||
unset($params['pg']);
|
||||
$first=true;
|
||||
foreach ($params as $key=>$value) {
|
||||
// Don't include the page number in the basic URI. This is added in
|
||||
// during the list display loop.
|
||||
if (!strcasecmp($key, "pg")) {
|
||||
continue;
|
||||
}
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $subkey=>$subvalue) {
|
||||
$resultsURI .= ($first ? "?" : "&").$key."%5B".$subkey."%5D=".urlencode($subvalue);
|
||||
$first = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$resultsURI .= ($first ? "?" : "&").$key."=".urlencode($value);
|
||||
}
|
||||
$first = false;
|
||||
if($params) {
|
||||
$resultsURI .= '?'.http_build_query($params);
|
||||
$first=false;
|
||||
}
|
||||
|
||||
echo "<div class=\"pagination pagination-small\">";
|
||||
|
|
Loading…
Reference in New Issue
Block a user