浏览代码

Load $nb/2 articles when reading view

Fix https://github.com/marienfressinaud/FreshRSS/commit/7d5e57b35b4eca07417c296c156edb3b88eef90b
See https://github.com/marienfressinaud/FreshRSS/issues/559
Marien Fressinaud 11 年之前
父节点
当前提交
07d123f1aa
共有 4 个文件被更改,包括 4 次插入6 次删除
  1. 1 1
      app/Controllers/indexController.php
  2. 1 1
      app/i18n/en.php
  3. 1 1
      app/i18n/fr.php
  4. 1 3
      app/views/configure/reading.phtml

+ 1 - 1
app/Controllers/indexController.php

@@ -84,7 +84,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 		$first = Minz_Request::param ('next', '');
 
 		$ajax_request = Minz_Request::param('ajax', false);
-		if ($ajax_request == 1 && $this->view->conf->display_posts) {
+		if ($output === 'reader') {
 			$nb = max(1, round($nb / 2));
 		}
 

+ 1 - 1
app/i18n/en.php

@@ -276,7 +276,7 @@ return array (
 	'reading_configuration'		=> 'Reading',
 	'display_configuration'		=> 'Display',
 	'articles_per_page'		=> 'Number of articles per page',
-	'number_divided_when_unfolded'	=> 'Divided by 2 during loading of unfolded articles.',
+	'number_divided_when_reader'	=> 'Divided by 2 in the reading view.',
 	'default_view'			=> 'Default view',
 	'articles_to_display'		=> 'Articles to display',
 	'sort_order'			=> 'Sort order',

+ 1 - 1
app/i18n/fr.php

@@ -276,7 +276,7 @@ return array (
 	'reading_configuration'		=> 'Lecture',
 	'display_configuration'		=> 'Affichage',
 	'articles_per_page'		=> 'Nombre d’articles par page',
-	'number_divided_when_unfolded'	=> 'Divisé par 2 lors du chargement d’articles dépliés.',
+	'number_divided_when_reader'	=> 'Divisé par 2 dans la vue de lecture.',
 	'default_view'			=> 'Vue par défaut',
 	'articles_to_display'		=> 'Articles à afficher',
 	'sort_order'			=> 'Ordre de tri',

+ 1 - 3
app/views/configure/reading.phtml

@@ -10,9 +10,7 @@
 			<label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
 			<div class="group-controls">
 				<input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" min="5" max="50" />
-				<?php if ($this->conf->display_posts) { ?>
-				<?php echo _i('help'); ?> <?php echo _t('number_divided_when_unfolded'); ?>
-				<?php } ?>
+				<?php echo _i('help'); ?> <?php echo _t('number_divided_when_reader'); ?>
 			</div>
 		</div>