Bugfix on empty feeds detection

This commit is contained in:
Frederic Guillot 2013-07-16 20:43:10 -04:00
parent 415a7a6c58
commit 466bb0a51a
4 changed files with 11 additions and 6 deletions

View File

@ -374,7 +374,12 @@ Router\get_action('feeds', function() {
$listing[] = '"'.$feed['title'].'"';
}
$message = t('The following feeds are empty, there is maybe an error: %s', implode(', ', $listing));
$message = t(
'There is %d empty feeds, there is maybe an error: %s...',
count($empty_feeds),
implode(', ', array_slice($listing, 0, 5))
);
Session\flash_error($message);
}

View File

@ -3,8 +3,8 @@
return array(
'No item' => 'Žádný článěk',
'items' => 'články',
'The following feeds are empty, there is maybe an error: %s' =>
'Následující zdroje jsou prázdně, možná je tu chyba: %s',
'There is %d empty feeds, there is maybe an error: %s...' =>
'K dispozici je %d prázdné kanály, je možná chyba: %s...',
'Items per page' => 'Článků na stránku',
'Previous page' => 'Předchozí stránka',
'Next page' => 'Další stránka',

View File

@ -3,8 +3,8 @@
return array(
'No item' => 'Aucun élément',
'items' => 'éléments',
'The following feeds are empty, there is maybe an error: %s' =>
'Les abonnements suivants sont vides, il y a peut-être une erreur : %s',
'There is %d empty feeds, there is maybe an error: %s...' =>
'Il y a %d abonnements vides, il y a peut-être un problème : %s...',
'Items per page' => 'Nombre d\'éléments par page',
'Previous page' => 'Page précédente',
'Next page' => 'Page suivante',

View File

@ -256,7 +256,7 @@ function get_empty_feeds()
->columns('feeds.id', 'feeds.title', 'COUNT(items.id) AS nb_items')
->join('items', 'feed_id', 'id')
->isNull('feeds.last_checked')
->groupBy('items.feed_id')
->groupBy('feeds.id')
->findAll();
foreach ($feeds as $key => &$feed) {