diff --git a/book.php b/book.php index 5fd8367..275abdd 100644 --- a/book.php +++ b/book.php @@ -94,15 +94,18 @@ class Book extends Base { } public function getUri () { - return "?page=".parent::PAGE_BOOK_DETAIL."&id=$this->id"; + return "?page=".parent::PAGE_BOOK_DETAIL."&id=$this->id"; } - public function getDetailUrl () { + public function getDetailUrl ($permalink = false) { global $config; - if ($config['cops_use_fancyapps'] == 0) { - return 'index.php' . $this->getUri (); + $urlParam = $this->getUri (); + if (!is_null (GetUrlParam (DB))) $urlParam = addURLParameter ($urlParam, DB, GetUrlParam (DB)); + $urlParam = str_replace ("&", "&", $urlParam); + if ($permalink || $config['cops_use_fancyapps'] == 0) { + return 'index.php' . $urlParam; } else { - return 'bookdetail.php?id=' . $this->id; + return 'bookdetail.php' . $urlParam; } } diff --git a/bookdetail.php b/bookdetail.php index 27343b5..d52747b 100644 --- a/bookdetail.php +++ b/bookdetail.php @@ -50,7 +50,7 @@ $book->getLinkArray (); } ?> -