summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-08 23:33:33 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-08 23:33:33 +0100
commita280bb1013f06599f7b20f29e4cc55226f0f8833 (patch)
tree8fced3f7dc4a96e423e2f3e0a1c9b977193edaf0
parent50e0339188107564fddb3abddeabbe0132cff6b1 (diff)
Changements syntaxiques mineurs aledeg/filters
https://github.com/marienfressinaud/FreshRSS/pull/352 Évite quelques appels de fonctions, et affectations inutiles
-rw-r--r--CHANGELOG1
-rw-r--r--app/i18n/en.php2
-rw-r--r--app/i18n/fr.php2
-rw-r--r--app/layout/nav_menu.phtml31
4 files changed, 17 insertions, 19 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 2d5a38d7a..45936ac03 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -26,6 +26,7 @@
* Permet de modifier la description et l’adresse d’un flux RSS ainsi que le site Web associé
* Nouveau raccourci pour ouvrir/fermer un article (‘c’ par défaut)
* Boutons pour effacer les logs et pour purger les vieux articles
+ * Nouveaux filtres d’affichage : seulement les articles favoris, et seulement les articles lus
* SQL :
* Nouveau moteur de recherche, aussi accessible depuis la vue mobile
* Mots clefs de recherche “intitle:”, “inurl:”, “author:”
diff --git a/app/i18n/en.php b/app/i18n/en.php
index 3717e0245..89af15b17 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -44,7 +44,7 @@ return array (
'rss_view' => 'RSS feed',
'show_all_articles' => 'Show all articles',
'show_not_reads' => 'Show only unread',
- 'show_read' => 'Show only read',
+ 'show_read' => 'Show only read',
'show_favorite' => 'Show favorites',
'older_first' => 'Oldest first',
'newer_first' => 'Newer first',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 42b6f8dcf..d4c96c1db 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -44,7 +44,7 @@ return array (
'rss_view' => 'Flux RSS',
'show_all_articles' => 'Afficher tous les articles',
'show_not_reads' => 'Afficher les non lus',
- 'show_read' => 'Afficher les lus',
+ 'show_read' => 'Afficher les lus',
'show_favorite' => 'Afficher les favoris',
'older_first' => 'Plus anciens en premier',
'newer_first' => 'Plus récents en premier',
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index adb8aea9b..566304353 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -103,21 +103,21 @@
$url_output = $url;
$actual_view = Minz_Request::param('output', 'normal');
?>
- <?php if($actual_view != 'normal') { ?>
+ <?php if($actual_view !== 'normal') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'normal'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
<?php echo Minz_Translate::t ('normal_view'); ?>
</a>
</li>
- <?php } if($actual_view != 'reader') { ?>
+ <?php } if($actual_view !== 'reader') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'reader'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
<?php echo Minz_Translate::t ('reader_view'); ?>
</a>
</li>
- <?php } if($actual_view != 'global') { ?>
+ <?php } if($actual_view !== 'global') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'global'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
@@ -130,41 +130,38 @@
<?php
$url_state = $url;
- $url_state['params']['state'] = 'all';
- if (strcmp($this->state, $url_state['params']['state']) <> 0) {
+ if ($this->state !== 'all') {
+ $url_state['params']['state'] = 'all';
?>
<li class="item">
<a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_all_articles'); ?>
</a>
</li>
- <?php } ?>
-
<?php
- $url_state['params']['state'] = 'not_read';
- if (strcmp($this->state, $url_state['params']['state']) <> 0) {
+ }
+ if ($this->state !== 'not_read') {
+ $url_state['params']['state'] = 'not_read';
?>
<li class="item">
<a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_not_reads'); ?>
</a>
</li>
- <?php } ?>
-
<?php
- $url_state['params']['state'] = 'read';
- if (strcmp($this->state, $url_state['params']['state']) <> 0) {
+ }
+ if ($this->state !== 'read') {
+ $url_state['params']['state'] = 'read';
?>
<li class="item">
<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_read'); ?>
</a>
</li>
- <?php } ?>
-
<?php
- $url_state['params']['state'] = 'favorite';
- if (strcmp($this->state, $url_state['params']['state']) <> 0) {
+ }
+ if ($this->state != 'favorite') {
+ $url_state['params']['state'] = 'favorite';
?>
<li class="item">
<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">