Add language in the book detail.

This commit is contained in:
Sébastien Lucas 2012-12-03 16:05:13 +01:00
parent 473117567d
commit eb637ff5f1
2 changed files with 19 additions and 0 deletions

View File

@ -95,6 +95,21 @@ class Book extends Base {
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 () {
if (is_null ($this->tags)) {
$this->tags = array ();

View File

@ -74,6 +74,10 @@ $book->getLinkArray ();
<?php
}
?>
<div class="entrySection">
<span><?php echo localize("config.Language.label") ?></span>
<?php echo $book->getLanguages () ?>
</div>
</div>
<div class="clearer" />
<hr />