Small fixes to facets handling. re #21
* Fix ths duplicate of URL parameter * Fix when parameter is empty
This commit is contained in:
parent
e5d0933971
commit
11645b2155
4 changed files with 14 additions and 3 deletions
11
base.php
11
base.php
|
@ -81,6 +81,17 @@ function localize($phrase, $count=-1) {
|
|||
return $translations[$phrase];
|
||||
}
|
||||
|
||||
function addURLParameter($urlParams, $paramName, $paramValue) {
|
||||
$params = array();
|
||||
parse_str($urlParams, $params);
|
||||
if (empty ($paramValue)) {
|
||||
unset ($params[$paramName]);
|
||||
} else {
|
||||
$params[$paramName] = $paramValue;
|
||||
}
|
||||
return http_build_query($params);
|
||||
}
|
||||
|
||||
class Link
|
||||
{
|
||||
const OPDS_THUMBNAIL_TYPE = "http://opds-spec.org/image/thumbnail";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue