Add option to not redirect user when having nothing to read

This commit is contained in:
Frederic Guillot 2017-02-01 18:10:50 -05:00
parent bd98d3d582
commit 2c113bb822
15 changed files with 32 additions and 3 deletions

View File

@ -17,7 +17,10 @@ Router\get_action('unread', function () {
if ($params['nb_unread_items'] === 0) {
$action = Helper\config('redirect_nothing_to_read', 'feeds');
Response\redirect('?action='.$action.'&nothing_to_read=1');
if ($action !== 'nowhere') {
Response\redirect('?action='.$action.'&nothing_to_read=1');
}
}
Response\html(Template\layout('unread/items', $params + array(

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -89,7 +89,6 @@ return array(
'Previous item' => 'Vorheriger Eintrag',
'Next item' => 'Nächster Eintrag',
'Mark as read or unread' => 'Als gelesen oder ungelesen markieren',
'Mark all unread items as read' => 'Alle ungelesenen Einträge als gelesen markieren',
'Open original link' => 'Original-Link öffnen',
'Open item' => 'Eintrag öffnen',
'About' => 'Über',
@ -267,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
'Mark all unread items as read' => 'Alle ungelesenen Einträge als gelesen markieren',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -93,7 +93,7 @@ return array(
'Open item' => 'Ouvrir un élément',
'About' => 'A propos',
'Miniflux version:' => 'Version de Miniflux :',
'Nothing to read' => 'Rien à lire',
'Nothing to read' => 'Il n\'y a rien à lire.',
'mark all as read' => 'tout marquer comme lu',
'original link' => 'lien original',
'mark as read' => 'marquer comme lu',
@ -266,4 +266,6 @@ return array(
'This field is required' => 'Ce champ est requis',
'This value must be an integer' => 'Cette valeur doit être un entier',
'This text is too long (max. %d)' => 'Ce texte est trop long (max. %d)',
'Mark all unread items as read' => 'Marquer tous les éléments non lus comme lus',
'Do not redirect me' => 'Ne pas me rediriger'
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -268,4 +268,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -266,4 +266,6 @@ return array(
// 'This field is required' => '',
// 'This value must be an integer' => '',
// 'This text is too long (max. %d)' => '',
// 'Mark all unread items as read' => '',
// 'Do not redirect me' => '',
);

View File

@ -144,6 +144,7 @@ function get_nothing_to_read_redirections()
'feeds' => t('Subscriptions'),
'history' => t('History'),
'bookmarks' => t('Bookmarks'),
'nowhere' => t('Do not redirect me'),
);
}