Przeglądaj źródła

Merge remote-tracking branch 'origin/sql_hash_lastUpdate' into dev

Alexandre Alapetite 11 lat temu
rodzic
commit
e6aeade47a

+ 1 - 0
app/Controllers/configureController.php

@@ -112,6 +112,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 			FreshRSS_Context::$user_conf->sticky_post = Minz_Request::param('sticky_post', false);
 			FreshRSS_Context::$user_conf->reading_confirm = Minz_Request::param('reading_confirm', false);
 			FreshRSS_Context::$user_conf->auto_remove_article = Minz_Request::param('auto_remove_article', false);
+			FreshRSS_Context::$user_conf->mark_updated_article_unread = Minz_Request::param('mark_updated_article_unread', false);
 			FreshRSS_Context::$user_conf->sort_order = Minz_Request::param('sort_order', 'DESC');
 			FreshRSS_Context::$user_conf->mark_when = array(
 				'article' => Minz_Request::param('mark_open_article', false),

+ 1 - 1
app/Controllers/feedController.php

@@ -343,7 +343,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
 							Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->id() .
 								', old hash ' . $existingHash . ', new hash ' . $entry->hash());
 							//TODO: Make an updated/is_read policy by feed, in addition to the global one.
-							$entry->_isRead(FreshRSS_Context::$system_conf->mark_updated_article_unread ? false : null);	//Change is_read according to policy.
+							$entry->_isRead(FreshRSS_Context::$user_conf->mark_updated_article_unread ? false : null);	//Change is_read according to policy.
 							if (!$entryDAO->hasTransaction()) {
 								$entryDAO->beginTransaction();
 							}

+ 4 - 0
app/Models/ConfigurationSetter.php

@@ -189,6 +189,10 @@ class FreshRSS_ConfigurationSetter {
 		$data['auto_remove_article'] = $this->handleBool($value);
 	}
 
+	private function _mark_updated_article_unread(&$data, $value) {
+		$data['mark_updated_article_unread'] = $this->handleBool($value);
+	}
+
 	private function _display_categories(&$data, $value) {
 		$data['display_categories'] = $this->handleBool($value);
 	}

+ 1 - 0
app/i18n/de/conf.php

@@ -84,6 +84,7 @@ return array(
 		'articles_per_page' => 'Anzahl der Artikel pro Seite',
 		'auto_load_more' => 'Die nächsten Artikel am Seitenende laden',
 		'auto_remove_article' => 'Artikel nach dem Lesen verstecken',
+		'mark_updated_article_unread' => 'Markieren Sie aktualisierte Artikel als ungelesen',
 		'confirm_enabled' => 'Bei der Aktion „Alle als gelesen markieren“ einen Bestätigungsdialog anzeigen',
 		'display_articles_unfolded' => 'Artikel standardmäßig ausgeklappt zeigen',
 		'display_categories_unfolded' => 'Kategorien standardmäßig eingeklappt zeigen',

+ 1 - 0
app/i18n/en/conf.php

@@ -84,6 +84,7 @@ return array(
 		'articles_per_page' => 'Number of articles per page',
 		'auto_load_more' => 'Load next articles at the page bottom',
 		'auto_remove_article' => 'Hide articles after reading',
+		'mark_updated_article_unread' => 'Mark updated articles as unread',
 		'confirm_enabled' => 'Display a confirmation dialog on “mark all as read” actions',
 		'display_articles_unfolded' => 'Show articles unfolded by default',
 		'display_categories_unfolded' => 'Show categories folded by default',

+ 1 - 0
app/i18n/fr/conf.php

@@ -84,6 +84,7 @@ return array(
 		'articles_per_page' => 'Nombre d’articles par page',
 		'auto_load_more' => 'Charger les articles suivants en bas de page',
 		'auto_remove_article' => 'Cacher les articles après lecture',
+		'mark_updated_article_unread' => 'Marquer les articles mis à jour comme non-lus',
 		'confirm_enabled' => 'Afficher une confirmation lors des actions “marquer tout comme lu”',
 		'display_articles_unfolded' => 'Afficher les articles dépliés par défaut',
 		'display_categories_unfolded' => 'Afficher les catégories pliées par défaut',

+ 9 - 0
app/views/configure/reading.phtml

@@ -125,6 +125,15 @@
 			</div>
 		</div>
 
+		<div class="form-group">
+			<div class="group-controls">
+				<label class="checkbox" for="mark_updated_article_unread">
+					<input type="checkbox" name="mark_updated_article_unread" id="mark_updated_article_unread" value="1"<?php echo FreshRSS_Context::$user_conf->mark_updated_article_unread ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->mark_updated_article_unread; ?>"/>
+					<?php echo _t('conf.reading.mark_updated_article_unread'); ?>
+				</label>
+			</div>
+		</div>
+
 		<div class="form-group">
 			<label class="group-name"><?php echo _t('conf.reading.read.when'); ?></label>
 			<div class="group-controls">

+ 0 - 4
data/config.default.php

@@ -55,10 +55,6 @@ return array(
 	#	SimplePie, which is retrieving RSS feeds via HTTP requests.
 	'simplepie_syslog_enabled' => true,
 
-	# In the case an article has changed (e.g. updated content):
-	#	Set to `true` to mark it unread, or `false` to leave it as-is.
-	'mark_updated_article_unread' => false,
-
 	'limits' => array(
 
 		# Duration in seconds of the SimplePie cache,

+ 5 - 0
data/users/_/config.default.php

@@ -22,6 +22,11 @@ return array (
 	'sticky_post' => true,
 	'reading_confirm' => false,
 	'auto_remove_article' => false,
+
+	# In the case an article has changed (e.g. updated content):
+	#	Set to `true` to mark it unread, or `false` to leave it as-is.
+	'mark_updated_article_unread' => false,
+
 	'sort_order' => 'DESC',
 	'anon_access' => false,
 	'mark_when' => array (