Fix when no languages are found. re #66

This commit is contained in:
Sébastien Lucas 2013-05-23 18:33:02 +02:00
parent 0825aae6b6
commit c937a29d6c
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ class language extends Base {
public static function getCount() {
$nLanguages = parent::getDb ()->query('select count(*) from languages')->fetchColumn();
if ($nLanguages == 0) return NULL;
$entry = new Entry (localize("languages.title"), self::ALL_LANGUAGES_ID,
str_format (localize("languages.alphabetical", $nLanguages), $nLanguages), "text non",
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_LANGUAGES)));