Ver Fonte

Format unread counter in title on page load (#9263)

For consistency with JS: https://github.com/FreshRSS/FreshRSS/pull/8577#issuecomment-4017150896
Inverle há 17 horas atrás
pai
commit
5a842b25ee
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      app/Controllers/indexController.php

+ 2 - 2
app/Controllers/indexController.php

@@ -149,7 +149,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController {
 			$title = '“' . htmlspecialchars($search, ENT_COMPAT, 'UTF-8') . '”';
 		}
 		if (FreshRSS_Context::userConf()->show_title_unread && FreshRSS_Context::$get_unread > 0) {
-			$title = '(' . FreshRSS_Context::$get_unread . ') ' . $title;
+			$title = '(' . format_number(FreshRSS_Context::$get_unread) . ') ' . $title;
 		}
 		if (strlen($title) > 0) {
 			FreshRSS_View::prependTitle($title . ' · ');
@@ -239,7 +239,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController {
 		$this->view->rss_title = FreshRSS_Context::$name . ' | ' . FreshRSS_View::title();
 		$title = _t('index.feed.title_global');
 		if (FreshRSS_Context::userConf()->show_title_unread && FreshRSS_Context::$get_unread > 0) {
-			$title = '(' . FreshRSS_Context::$get_unread . ') ' . $title;
+			$title = '(' . format_number(FreshRSS_Context::$get_unread) . ') ' . $title;
 		}
 		FreshRSS_View::prependTitle($title . ' · ');