Add language in the book detail.
This commit is contained in:
parent
473117567d
commit
eb637ff5f1
15
book.php
15
book.php
|
@ -95,6 +95,21 @@ class Book extends Base {
|
||||||
return $this->serie;
|
return $this->serie;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLanguages () {
|
||||||
|
$lang = array ();
|
||||||
|
$result = parent::getDb ()->prepare('select languages.lang_code
|
||||||
|
from books_languages_link, languages
|
||||||
|
where books_languages_link.lang_code = languages.id
|
||||||
|
and book = ?
|
||||||
|
order by item_order');
|
||||||
|
$result->execute (array ($this->id));
|
||||||
|
while ($post = $result->fetchObject ())
|
||||||
|
{
|
||||||
|
array_push ($lang, $post->lang_code);
|
||||||
|
}
|
||||||
|
return implode (", ", $lang);
|
||||||
|
}
|
||||||
|
|
||||||
public function getTags () {
|
public function getTags () {
|
||||||
if (is_null ($this->tags)) {
|
if (is_null ($this->tags)) {
|
||||||
$this->tags = array ();
|
$this->tags = array ();
|
||||||
|
|
|
@ -74,6 +74,10 @@ $book->getLinkArray ();
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<div class="entrySection">
|
||||||
|
<span><?php echo localize("config.Language.label") ?></span>
|
||||||
|
<?php echo $book->getLanguages () ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer" />
|
<div class="clearer" />
|
||||||
<hr />
|
<hr />
|
||||||
|
|
Loading…
Reference in a new issue