Fix a bad URL in OPDS catalog. re #40

This commit is contained in:
Sébastien Lucas 2013-04-30 09:57:12 +02:00
parent d35b7d4dc4
commit 6512313733
1 changed files with 1 additions and 0 deletions

View File

@ -202,6 +202,7 @@ class LinkNavigation extends Link
public function __construct($phref, $prel = NULL, $ptitle = NULL) {
parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle);
if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB));
if (!preg_match ("#^\?(.*)#", $this->href) && !empty ($this->href)) $this->href = "?" . $this->href;
if (preg_match ("/bookdetail.php/", $_SERVER["SCRIPT_NAME"])) {
$this->href = "index.php" . $this->href;
} else {