Fix book detail with multi database. re #40
This commit is contained in:
parent
78b60baebd
commit
383a33b597
13
book.php
13
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ $book->getLinkArray ();
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="entryTitle"><a rel="bookmark" href="<?php echo 'index.php' . $book->getUri () ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="permalink" /></a><?php echo htmlspecialchars ($book->title) ?></div>
|
||||
<div class="entryTitle"><a rel="bookmark" href="<?php echo $book->getDetailUrl (true) ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="permalink" /></a><?php echo htmlspecialchars ($book->title) ?></div>
|
||||
<div class="entrySection">
|
||||
<span><?php echo localize("authors.title") ?></span>
|
||||
<div class="buttonEffect pad6">
|
||||
|
|
Loading…
Reference in a new issue