Handle when $config['cops_recentbooks_limit'] is <= 0. fix #94
This commit is contained in:
parent
b255d306d0
commit
bf0bb3170d
12
book.php
12
book.php
|
@ -462,11 +462,13 @@ class Book extends Base {
|
||||||
str_format (localize ("allbooks.alphabetical", $nBooks), $nBooks), "text",
|
str_format (localize ("allbooks.alphabetical", $nBooks), $nBooks), "text",
|
||||||
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_BOOKS)));
|
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_BOOKS)));
|
||||||
array_push ($result, $entry);
|
array_push ($result, $entry);
|
||||||
$entry = new Entry (localize ("recent.title"),
|
if ($config['cops_recentbooks_limit'] > 0) {
|
||||||
self::ALL_RECENT_BOOKS_ID,
|
$entry = new Entry (localize ("recent.title"),
|
||||||
str_format (localize ("recent.list"), $config['cops_recentbooks_limit']), "text",
|
self::ALL_RECENT_BOOKS_ID,
|
||||||
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_RECENT_BOOKS)));
|
str_format (localize ("recent.list"), $config['cops_recentbooks_limit']), "text",
|
||||||
array_push ($result, $entry);
|
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_RECENT_BOOKS)));
|
||||||
|
array_push ($result, $entry);
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue