From 99dfdbc10d9daa8059fd6c017b1580ad493aa8f6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 8 Jul 2018 11:29:05 +0200 Subject: Avoid feed credentials in logs (#1949) * Avoid feed credentials in logs Related to https://github.com/FreshRSS/FreshRSS/pull/1891 * Changelog 1949 --- app/Models/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 89eb0a53c..0b5647261 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -59,8 +59,8 @@ class FreshRSS_Feed extends Minz_Model { return $this->hash; } - public function url() { - return $this->url; + public function url($includeCredentials = true) { + return $includeCredentials ? $this->url : SimplePie_Misc::url_remove_credentials($this->url); } public function selfUrl() { return $this->selfUrl; -- cgit v1.2.3 From 32d9c3b7905f4e43ffdf4bf2bf37723cfd18390c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 2 Sep 2018 13:19:58 +0200 Subject: Use mb_strcut (#1996) * Use mb_strcut Avoid cutting in the middle of a multi-byte UTF-8 character * Forgotten php5-* * Typo * Whitespace * More mb_strcut --- README.fr.md | 2 +- README.md | 2 +- app/Models/Category.php | 2 +- app/Models/CategoryDAO.php | 2 +- app/Models/Entry.php | 5 +++-- app/Models/EntryDAO.php | 12 ++++++------ app/Models/FeedDAO.php | 4 ++-- app/i18n/cz/admin.php | 6 +++++- app/i18n/cz/install.php | 4 ++++ app/i18n/de/admin.php | 6 +++++- app/i18n/de/install.php | 4 ++++ app/i18n/en/admin.php | 6 +++++- app/i18n/en/install.php | 4 ++++ app/i18n/es/admin.php | 6 +++++- app/i18n/es/install.php | 4 ++++ app/i18n/fr/admin.php | 8 ++++++-- app/i18n/fr/install.php | 8 ++++++-- app/i18n/he/admin.php | 10 +++++++--- app/i18n/he/install.php | 10 +++++++++- app/i18n/it/admin.php | 6 +++++- app/i18n/it/install.php | 4 ++++ app/i18n/kr/admin.php | 6 +++++- app/i18n/kr/install.php | 6 +++++- app/i18n/nl/admin.php | 6 +++++- app/i18n/nl/install.php | 4 ++++ app/i18n/pt-br/admin.php | 6 +++++- app/i18n/pt-br/install.php | 6 +++++- app/i18n/ru/admin.php | 6 +++++- app/i18n/ru/install.php | 4 ++++ app/i18n/tr/admin.php | 6 +++++- app/i18n/tr/install.php | 4 ++++ app/i18n/zh-cn/admin.php | 6 +++++- app/i18n/zh-cn/install.php | 4 ++++ app/install.php | 6 ++++++ lib/lib_install.php | 2 ++ lib/lib_rss.php | 7 +++++++ 36 files changed, 159 insertions(+), 35 deletions(-) (limited to 'app/Models') diff --git a/README.fr.md b/README.fr.md index 78a182d7b..20fbf955d 100644 --- a/README.fr.md +++ b/README.fr.md @@ -37,7 +37,7 @@ Nous sommes une communauté amicale. * Serveur Web Apache2 (recommandé), ou nginx, lighttpd (non testé sur les autres) * PHP 5.3.8+ (PHP 5.4+ recommandé, et PHP 5.5+ pour les performances, et PHP 7+ pour d’encore meilleures performances) * Requis : [cURL](https://secure.php.net/curl), [DOM](https://secure.php.net/dom), [XML](https://secure.php.net/xml), [session](https://secure.php.net/session), [ctype](https://secure.php.net/ctype), et [PDO_MySQL](https://secure.php.net/pdo-mysql) ou [PDO_SQLite](https://secure.php.net/pdo-sqlite) ou [PDO_PGSQL](https://secure.php.net/pdo-pgsql) - * Recommandés : [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (pour accès API sur plateformes < 64 bits), [IDN](https://secure.php.net/intl.idn) (pour les noms de domaines internationalisés), [mbstring](https://secure.php.net/mbstring) et/ou [iconv](https://secure.php.net/iconv) (pour conversion d’encodages), [ZIP](https://secure.php.net/zip) (pour import/export), [zlib](https://secure.php.net/zlib) (pour les flux compressés) + * Recommandés : [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (pour accès API sur plateformes < 64 bits), [IDN](https://secure.php.net/intl.idn) (pour les noms de domaines internationalisés), [mbstring](https://secure.php.net/mbstring) (pour le texte Unicode), [iconv](https://secure.php.net/iconv) (pour conversion d’encodages), [ZIP](https://secure.php.net/zip) (pour import/export), [zlib](https://secure.php.net/zlib) (pour les flux compressés) * MySQL 5.5.3+ (recommandé), ou SQLite 3.7.4+, ou PostgreSQL 9.2+ * Un navigateur Web récent tel que Firefox / IceCat, Internet Explorer 11 / Edge, Chromium / Chrome, Opera, Safari. * Fonctionne aussi sur mobile diff --git a/README.md b/README.md index 7d6c51338..4567c50c6 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ We are a friendly community. * A web server: Apache2 (recommended), nginx, lighttpd (not tested on others) * PHP 5.3.8+ (PHP 5.4+ recommended, and PHP 5.5+ for performance, and PHP 7 for even higher performance) * Required extensions: [cURL](https://secure.php.net/curl), [DOM](https://secure.php.net/dom), [XML](https://secure.php.net/xml), [session](https://secure.php.net/session), [ctype](https://secure.php.net/ctype), and [PDO_MySQL](https://secure.php.net/pdo-mysql) or [PDO_SQLite](https://secure.php.net/pdo-sqlite) or [PDO_PGSQL](https://secure.php.net/pdo-pgsql) - * Recommended extensions: [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (for API access on platforms < 64 bits), [IDN](https://secure.php.net/intl.idn) (for Internationalized Domain Names), [mbstring](https://secure.php.net/mbstring) and/or [iconv](https://secure.php.net/iconv) (for charset conversion), [ZIP](https://secure.php.net/zip) (for import/export), [zlib](https://secure.php.net/zlib) (for compressed feeds) + * Recommended extensions: [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (for API access on platforms < 64 bits), [IDN](https://secure.php.net/intl.idn) (for Internationalized Domain Names), [mbstring](https://secure.php.net/mbstring) (for Unicode strings), [iconv](https://secure.php.net/iconv) (for charset conversion), [ZIP](https://secure.php.net/zip) (for import/export), [zlib](https://secure.php.net/zlib) (for compressed feeds) * MySQL 5.5.3+ (recommended), or SQLite 3.7.4+, or PostgreSQL 9.2+ * A recent browser like Firefox / IceCat, Internet Explorer 11 / Edge, Chromium / Chrome, Opera, Safari. * Works on mobile diff --git a/app/Models/Category.php b/app/Models/Category.php index 9a44a2d09..197faf942 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -68,7 +68,7 @@ class FreshRSS_Category extends Minz_Model { $this->id = $value; } public function _name($value) { - $this->name = substr(trim($value), 0, 255); + $this->name = mb_strcut(trim($value), 0, 255, 'UTF-8'); } public function _feeds($values) { if (!is_array($values)) { diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index ef2c402a0..cf6b3bae3 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -9,7 +9,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $stm = $this->bd->prepare($sql); $values = array( - substr($valuesTmp['name'], 0, 255), + mb_strcut($valuesTmp['name'], 0, 255, 'UTF-8'), ); if ($stm && $stm->execute($values)) { diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 2b6059638..ccbad5724 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -31,6 +31,7 @@ class FreshRSS_Entry extends Minz_Model { $this->_isRead($is_read); $this->_isFavorite($is_favorite); $this->_feedId($feedId); + $tags = mb_strcut($tags, 0, 1023, 'UTF-8'); $this->_tags(preg_split('/[\s#]/', $tags)); $this->_guid($guid); } @@ -123,11 +124,11 @@ class FreshRSS_Entry extends Minz_Model { } public function _title($value) { $this->hash = null; - $this->title = $value; + $this->title = mb_strcut($value, 0, 255, 'UTF-8'); } public function _author($value) { $this->hash = null; - $this->author = $value; + $this->author = mb_strcut($value, 0, 255, 'UTF-8'); } public function _content($value) { $this->hash = null; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 59f826c3e..73651187f 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -160,9 +160,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $valuesTmp['guid'] = substr($valuesTmp['guid'], 0, 760); $valuesTmp['guid'] = safe_ascii($valuesTmp['guid']); $this->addEntryPrepared->bindParam(':guid', $valuesTmp['guid']); - $valuesTmp['title'] = substr($valuesTmp['title'], 0, 255); + $valuesTmp['title'] = mb_strcut($valuesTmp['title'], 0, 255, 'UTF-8'); $this->addEntryPrepared->bindParam(':title', $valuesTmp['title']); - $valuesTmp['author'] = substr($valuesTmp['author'], 0, 255); + $valuesTmp['author'] = mb_strcut($valuesTmp['author'], 0, 255, 'UTF-8'); $this->addEntryPrepared->bindParam(':author', $valuesTmp['author']); $this->addEntryPrepared->bindParam(':content', $valuesTmp['content']); $valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023); @@ -176,7 +176,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $valuesTmp['is_favorite'] = $valuesTmp['is_favorite'] ? 1 : 0; $this->addEntryPrepared->bindParam(':is_favorite', $valuesTmp['is_favorite'], PDO::PARAM_INT); $this->addEntryPrepared->bindParam(':id_feed', $valuesTmp['id_feed'], PDO::PARAM_INT); - $valuesTmp['tags'] = substr($valuesTmp['tags'], 0, 1023); + $valuesTmp['tags'] = mb_strcut($valuesTmp['tags'], 0, 1023, 'UTF-8'); $this->addEntryPrepared->bindParam(':tags', $valuesTmp['tags']); if ($this->hasNativeHex()) { @@ -243,9 +243,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $valuesTmp['guid'] = substr($valuesTmp['guid'], 0, 760); $this->updateEntryPrepared->bindParam(':guid', $valuesTmp['guid']); - $valuesTmp['title'] = substr($valuesTmp['title'], 0, 255); + $valuesTmp['title'] = mb_strcut($valuesTmp['title'], 0, 255, 'UTF-8'); $this->updateEntryPrepared->bindParam(':title', $valuesTmp['title']); - $valuesTmp['author'] = substr($valuesTmp['author'], 0, 255); + $valuesTmp['author'] = mb_strcut($valuesTmp['author'], 0, 255, 'UTF-8'); $this->updateEntryPrepared->bindParam(':author', $valuesTmp['author']); $this->updateEntryPrepared->bindParam(':content', $valuesTmp['content']); $valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023); @@ -258,7 +258,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $this->updateEntryPrepared->bindValue(':is_read', $valuesTmp['is_read'] ? 1 : 0, PDO::PARAM_INT); } $this->updateEntryPrepared->bindParam(':id_feed', $valuesTmp['id_feed'], PDO::PARAM_INT); - $valuesTmp['tags'] = substr($valuesTmp['tags'], 0, 1023); + $valuesTmp['tags'] = mb_strcut($valuesTmp['tags'], 0, 1023, 'UTF-8'); $this->updateEntryPrepared->bindParam(':tags', $valuesTmp['tags']); if ($this->hasNativeHex()) { diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 9d980c139..285f17193 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -55,9 +55,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $values = array( substr($valuesTmp['url'], 0, 511), $valuesTmp['category'], - substr($valuesTmp['name'], 0, 255), + mb_strcut($valuesTmp['name'], 0, 255, 'UTF-8'), substr($valuesTmp['website'], 0, 255), - substr($valuesTmp['description'], 0, 1023), + mb_strcut($valuesTmp['description'], 0, 1023, 'UTF-8'), $valuesTmp['lastUpdate'], base64_encode($valuesTmp['httpAuth']), FreshRSS_Feed::KEEP_HISTORY_DEFAULT, diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.php index d414ffd07..78a4a52e4 100644 --- a/app/i18n/cz/admin.php +++ b/app/i18n/cz/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Instalace souborů', 'json' => array( - 'nok' => 'Nemáte JSON (balíček php5-json).', + 'nok' => 'Nemáte JSON (balíček php-json).', 'ok' => 'Máte rozšíření JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Nemáte framework Minz.', 'ok' => 'Máte framework Minz.', diff --git a/app/i18n/cz/install.php b/app/i18n/cz/install.php index ea4812ea5..acdb48ab6 100644 --- a/app/i18n/cz/install.php +++ b/app/i18n/cz/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'Pro parsování JSON chybí doporučená knihovna.', 'ok' => 'Máte doporučenou knihovnu pro parsování JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Nemáte framework Minz.', 'ok' => 'Máte framework Minz.', diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php index f03e6cdaf..fbeb80296 100644 --- a/app/i18n/de/admin.php +++ b/app/i18n/de/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Datei-Installation', 'json' => array( - 'nok' => 'Ihnen fehlt die JSON-Erweiterung (Paket php5-json).', + 'nok' => 'Ihnen fehlt die JSON-Erweiterung (Paket php-json).', 'ok' => 'Sie haben die JSON-Erweiterung.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Ihnen fehlt das Minz-Framework.', 'ok' => 'Sie haben das Minz-Framework.', diff --git a/app/i18n/de/install.php b/app/i18n/de/install.php index b747d1551..d28b22840 100644 --- a/app/i18n/de/install.php +++ b/app/i18n/de/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'Ihnen fehlt eine empfohlene Bibliothek um JSON zu parsen.', 'ok' => 'Sie haben eine empfohlene Bibliothek um JSON zu parsen.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Ihnen fehlt das Minz-Framework.', 'ok' => 'Sie haben das Minz-Framework.', diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php index 1f857dbab..9db14978f 100644 --- a/app/i18n/en/admin.php +++ b/app/i18n/en/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'File installation', 'json' => array( - 'nok' => 'Cannot find JSON (php5-json package).', + 'nok' => 'Cannot find JSON (php-json package).', 'ok' => 'You have JSON extension.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', + 'ok' => 'You have the recommended library mbstring for Unicode.', + ), 'minz' => array( 'nok' => 'Cannot find the Minz framework.', 'ok' => 'You have the Minz framework.', diff --git a/app/i18n/en/install.php b/app/i18n/en/install.php index 40fff37dd..53d2f9be0 100644 --- a/app/i18n/en/install.php +++ b/app/i18n/en/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'Cannot find a recommended library to parse JSON.', 'ok' => 'You have a recommended library to parse JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Cannot find the Minz framework.', 'ok' => 'You have the Minz framework.', diff --git a/app/i18n/es/admin.php b/app/i18n/es/admin.php index 2884721c7..db41057bf 100755 --- a/app/i18n/es/admin.php +++ b/app/i18n/es/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Instalación de Archivos', 'json' => array( - 'nok' => 'No se ha podido localizar JSON (paquete php5-json).', + 'nok' => 'No se ha podido localizar JSON (paquete php-json).', 'ok' => 'Dispones de la extensión JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'No se ha podido localizar el entorno Minz.', 'ok' => 'Dispones del entorno Minz.', diff --git a/app/i18n/es/install.php b/app/i18n/es/install.php index cd6f63432..a9be807c7 100755 --- a/app/i18n/es/install.php +++ b/app/i18n/es/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'No se ha podido localizar la librería para procesar JSON.', 'ok' => 'Dispones de la librería recomendada para procesar JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'No se ha podido localizar el entorno Minz.', 'ok' => 'Dispones del entorno Minz.', diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php index 6c582d719..1874f2c77 100644 --- a/app/i18n/fr/admin.php +++ b/app/i18n/fr/admin.php @@ -63,8 +63,12 @@ return array( ), 'files' => 'Installation des fichiers', 'json' => array( - 'nok' => 'Vous ne disposez pas de JSON (paquet php5-json).', - 'ok' => 'Vous disposez de l’extension JSON.', + 'nok' => 'Vous ne disposez pas de l’extension recommendée JSON (paquet php-json).', + 'ok' => 'Vous disposez de l’extension recommendée JSON.', + ), + 'mbstring' => array( + 'nok' => 'Impossible de trouver la librairie recommandée mbstring pour Unicode.', + 'ok' => 'Vouz disposez de la librairie recommandée mbstring pour Unicode.', ), 'minz' => array( 'nok' => 'Vous ne disposez pas de la librairie Minz.', diff --git a/app/i18n/fr/install.php b/app/i18n/fr/install.php index 09625de78..9f2d90195 100644 --- a/app/i18n/fr/install.php +++ b/app/i18n/fr/install.php @@ -65,8 +65,12 @@ return array( 'ok' => 'Le HTTP REFERER est connu et semble correspondre à votre serveur.', ), 'json' => array( - 'nok' => 'Impossible de trouver une librairie recommandée pour JSON.', - 'ok' => 'Vouz disposez de la librairie recommandée pour JSON.', + 'nok' => 'Vous ne disposez pas de l’extension recommendée JSON (paquet php-json).', + 'ok' => 'Vous disposez de l’extension recommendée JSON.', + ), + 'mbstring' => array( + 'nok' => 'Impossible de trouver la librairie recommandée mbstring pour Unicode.', + 'ok' => 'Vouz disposez de la librairie recommandée mbstring pour Unicode.', ), 'minz' => array( 'nok' => 'Vous ne disposez pas de la librairie Minz.', diff --git a/app/i18n/he/admin.php b/app/i18n/he/admin.php index 2840213c9..71f86357e 100644 --- a/app/i18n/he/admin.php +++ b/app/i18n/he/admin.php @@ -33,7 +33,7 @@ return array( 'ok' => 'הספרייה הנדרשת ל character type checking (ctype) מותקנת', ), 'curl' => array( - 'nok' => 'בURL לא מותקן (php5-curl package)', + 'nok' => 'בURL לא מותקן (php-curl package)', 'ok' => 'You have cURL extension.', // @todo ), 'data' => array( @@ -63,9 +63,13 @@ return array( ), 'files' => 'File installation', // @todo 'json' => array( - 'nok' => 'You lack JSON (php5-json package).', // @todo + 'nok' => 'You lack JSON (php-json package).', // @todo 'ok' => 'You have JSON extension.', // @todo ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'You lack the Minz framework.', // @todo 'ok' => 'יש לכם את תשתית Minz', @@ -97,7 +101,7 @@ return array( 'ok' => 'Permissions on users directory are good.', // @todo ), 'zip' => array( - 'nok' => 'You lack ZIP extension (php5-zip package).', // @todo + 'nok' => 'You lack ZIP extension (php-zip package).', // @todo 'ok' => 'You have ZIP extension.', // @todo ), ), diff --git a/app/i18n/he/install.php b/app/i18n/he/install.php index 6d7cee661..93b8063b3 100644 --- a/app/i18n/he/install.php +++ b/app/i18n/he/install.php @@ -40,7 +40,7 @@ return array( 'ok' => 'הספרייה הנדרשת ל character type checking (ctype) מותקנת', ), 'curl' => array( - 'nok' => 'בURL לא מותקן (php5-curl package)', + 'nok' => 'בURL לא מותקן (php-curl package)', 'ok' => 'יש לכם את גירסת %s של cURL', ), 'data' => array( @@ -59,6 +59,14 @@ return array( 'nok' => 'נא לדבוק שאינך פוגעת ב HTTP REFERER שלך.', 'ok' => 'הHTTP REFERER ידוע ותאם לשרת שלך.', ), + 'json' => array( + 'nok' => 'Cannot find a recommended library to parse JSON.', //TODO + 'ok' => 'You have a recommended library to parse JSON.', //TODO + ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'You lack the Minz framework.', // @todo 'ok' => 'יש לכם את תשתית Minz', diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.php index a3034777f..5696ed571 100644 --- a/app/i18n/it/admin.php +++ b/app/i18n/it/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Installazione files', 'json' => array( - 'nok' => 'Manca il supoorto a JSON (pacchetto php5-json).', + 'nok' => 'Manca il supoorto a JSON (pacchetto php-json).', 'ok' => 'Estensione JSON presente.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Manca il framework Minz.', 'ok' => 'Framework Minz presente.', diff --git a/app/i18n/it/install.php b/app/i18n/it/install.php index 18f8cc337..2d0a34885 100644 --- a/app/i18n/it/install.php +++ b/app/i18n/it/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'You lack a recommended library to parse JSON.', 'ok' => 'You have a recommended library to parse JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Manca il framework Minz.', 'ok' => 'Framework Minz presente.', diff --git a/app/i18n/kr/admin.php b/app/i18n/kr/admin.php index 0c9edb110..bc65b3fa2 100644 --- a/app/i18n/kr/admin.php +++ b/app/i18n/kr/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => '파일 시스템 설치 요구사항', 'json' => array( - 'nok' => 'JSON 확장 기능을 찾을 수 없습니다 (php5-json 패키지).', + 'nok' => 'JSON 확장 기능을 찾을 수 없습니다 (php-json 패키지).', 'ok' => 'JSON 확장 기능이 설치되어 있습니다.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Minz 프레임워크를 찾을 수 없습니다.', 'ok' => 'Minz 프레임워크가 설치되어 있습니다.', diff --git a/app/i18n/kr/install.php b/app/i18n/kr/install.php index 2eea71ff9..03a8ccdbe 100644 --- a/app/i18n/kr/install.php +++ b/app/i18n/kr/install.php @@ -65,9 +65,13 @@ return array( 'ok' => 'HTTP REFERER가 서버와 일치하는 것을 확인했습니다.', ), 'json' => array( - 'nok' => 'JSON 확장 기능을 찾을 수 없습니다 (php5-json 패키지).', + 'nok' => 'JSON 확장 기능을 찾을 수 없습니다 (php-json 패키지).', 'ok' => 'JSON 확장 기능이 설치되어 있습니다.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Minz 프레임워크를 찾을 수 없습니다.', 'ok' => 'Minz 프레임워크가 설치되어 있습니다.', diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php index a1d975305..8272e370c 100644 --- a/app/i18n/nl/admin.php +++ b/app/i18n/nl/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Bestanden installatie', 'json' => array( - 'nok' => 'U mist JSON (php5-json package).', + 'nok' => 'U mist JSON (php-json package).', 'ok' => 'U hebt JSON uitbreiding.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'U mist Minz framework.', 'ok' => 'U hebt Minz framework.', diff --git a/app/i18n/nl/install.php b/app/i18n/nl/install.php index 419ee4c9b..c7887bf8e 100644 --- a/app/i18n/nl/install.php +++ b/app/i18n/nl/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'U mist een benodigede bibliotheek om JSON te gebruiken.', 'ok' => 'U hebt de benodigde bibliotheek om JSON te gebruiken.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'U mist het Minz framework.', 'ok' => 'U hebt het Minz framework.', diff --git a/app/i18n/pt-br/admin.php b/app/i18n/pt-br/admin.php index 16aa027a8..51c5d381f 100644 --- a/app/i18n/pt-br/admin.php +++ b/app/i18n/pt-br/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Instalação de arquivos', 'json' => array( - 'nok' => 'Não foi possível encontrar JSON (php5-json).', + 'nok' => 'Não foi possível encontrar JSON (php-json).', 'ok' => 'Você tem a extensão JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Não foi possível encontrar o framework Minz.', 'ok' => 'Você tem o framework Minz.', diff --git a/app/i18n/pt-br/install.php b/app/i18n/pt-br/install.php index 3ca5fb854..65bddf62c 100644 --- a/app/i18n/pt-br/install.php +++ b/app/i18n/pt-br/install.php @@ -65,9 +65,13 @@ return array( 'ok' => 'Seu HTTP REFERER é conhecido e corresponde ao seu servidor.', ), 'json' => array( - 'nok' => 'Não foi possível encontrar JSON (php5-json).', + 'nok' => 'Não foi possível encontrar JSON (php-json).', 'ok' => 'Você tem a extensão JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Não foi possível encontrar o framework Minz.', 'ok' => 'Você tem o framework Minz.', diff --git a/app/i18n/ru/admin.php b/app/i18n/ru/admin.php index 4f5e937d7..91da8adcf 100644 --- a/app/i18n/ru/admin.php +++ b/app/i18n/ru/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Установка файлов', 'json' => array( - 'nok' => 'У вас не установлена библиотека для работы с JSON (пакет php5-json).', + 'nok' => 'У вас не установлена библиотека для работы с JSON (пакет php-json).', 'ok' => 'У вас установлена библиотека для работы с JSON.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'У вас не установлен фрейворк Minz.', 'ok' => 'У вас установлен фрейворк Minz.', diff --git a/app/i18n/ru/install.php b/app/i18n/ru/install.php index 1dea2cd66..c1d0e81e8 100644 --- a/app/i18n/ru/install.php +++ b/app/i18n/ru/install.php @@ -64,6 +64,10 @@ return array( 'nok' => 'Убедитесь, что вы не изменяете ваш HTTP REFERER.', 'ok' => 'Ваш HTTP REFERER известен и соотвествует вашему серверу.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'У вас не установлен фрейворк Minz.', 'ok' => 'У вас установлен фрейворк Minz.', diff --git a/app/i18n/tr/admin.php b/app/i18n/tr/admin.php index f982bf644..f481bb294 100644 --- a/app/i18n/tr/admin.php +++ b/app/i18n/tr/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => 'Dosya kurulumu', 'json' => array( - 'nok' => 'JSON eklentisi eksik (php5-json package).', + 'nok' => 'JSON eklentisi eksik (php-json package).', 'ok' => 'JSON eklentisi sorunsuz.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Minz framework eksik.', 'ok' => 'Minz framework sorunsuz.', diff --git a/app/i18n/tr/install.php b/app/i18n/tr/install.php index 4ae0ad7e3..f90e43f1d 100644 --- a/app/i18n/tr/install.php +++ b/app/i18n/tr/install.php @@ -68,6 +68,10 @@ return array( 'nok' => 'Tavsiye edilen JSON çözümleme kütüphanesi eksik.', 'ok' => 'Tavsiye edilen JSON çözümleme kütüphanesi sorunsuz.', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => 'Minz framework eksik.', 'ok' => 'Minz framework sorunsuz.', diff --git a/app/i18n/zh-cn/admin.php b/app/i18n/zh-cn/admin.php index 1072dc972..1f007f964 100644 --- a/app/i18n/zh-cn/admin.php +++ b/app/i18n/zh-cn/admin.php @@ -63,9 +63,13 @@ return array( ), 'files' => '文件相关', 'json' => array( - 'nok' => '找不到 JSON 扩展 (php5-json ) 。', + 'nok' => '找不到 JSON 扩展 (php-json ) 。', 'ok' => '已找到 JSON 扩展', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => '找不到 Minz 框架。', 'ok' => '已找到 Minz 框架。', diff --git a/app/i18n/zh-cn/install.php b/app/i18n/zh-cn/install.php index 1e172f0d5..fe34a44c0 100644 --- a/app/i18n/zh-cn/install.php +++ b/app/i18n/zh-cn/install.php @@ -68,6 +68,10 @@ return array( 'nok' => '找不到推荐的 JSON 解析库。', 'ok' => '已找到推荐的 JSON 解析库。', ), + 'mbstring' => array( + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + ), 'minz' => array( 'nok' => '找不到 Minz 框架。', 'ok' => '已找到 Minz 框架。', diff --git a/app/install.php b/app/install.php index c30f8d583..100360f82 100644 --- a/app/install.php +++ b/app/install.php @@ -462,6 +462,12 @@ function printStep1() {

+ +

+ +

+ +

diff --git a/lib/lib_install.php b/lib/lib_install.php index 7305d8e28..d51a37e58 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -41,6 +41,7 @@ function checkRequirements($dbType = '') { $dom = class_exists('DOMDocument'); $xml = function_exists('xml_parser_create'); $json = function_exists('json_encode'); + $mbstring = extension_loaded('mbstring'); $data = DATA_PATH && is_writable(DATA_PATH); $cache = CACHE_PATH && is_writable(CACHE_PATH); $users = USERS_PATH && is_writable(USERS_PATH); @@ -61,6 +62,7 @@ function checkRequirements($dbType = '') { 'dom' => $dom ? 'ok' : 'ko', 'xml' => $xml ? 'ok' : 'ko', 'json' => $json ? 'ok' : 'ko', + 'mbstring' => $mbstring ? 'ok' : 'ko', 'data' => $data ? 'ok' : 'ko', 'cache' => $cache ? 'ok' : 'ko', 'users' => $users ? 'ok' : 'ko', diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 5f460862e..60616b3ca 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -21,6 +21,12 @@ if (!function_exists('json_encode')) { defined('JSON_UNESCAPED_UNICODE') or define('JSON_UNESCAPED_UNICODE', 256); //PHP 5.3 +if (!function_exists('mb_strcut')) { + function mb_strcut($str, $start, $length = null, $encoding = 'UTF-8') { + return substr($str, $start, $length); + } +} + /** * Build a directory path by concatenating a list of directory names. * @@ -405,6 +411,7 @@ function check_install_php() { 'fileinfo' => extension_loaded('fileinfo'), 'dom' => class_exists('DOMDocument'), 'json' => extension_loaded('json'), + 'mbstring' => extension_loaded('mbstring'), 'zip' => extension_loaded('zip'), ); } -- cgit v1.2.3 From 14e1b23e42b322b9c54475e4b69c1aa60c94e280 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 2 Sep 2018 13:36:46 +0200 Subject: Allow multiple authors (#1997) Fix https://github.com/FreshRSS/FreshRSS/issues/1968 --- app/Models/Feed.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'app/Models') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 0b5647261..ed381a867 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -341,7 +341,7 @@ class FreshRSS_Feed extends Minz_Model { foreach ($feed->get_items() as $item) { $title = html_only_entity_decode(strip_tags($item->get_title())); - $author = $item->get_author(); + $authors = $item->get_authors(); $link = $item->get_permalink(); $date = @strtotime($item->get_date()); @@ -409,12 +409,19 @@ class FreshRSS_Feed extends Minz_Model { $guid = $item->get_id(false, false); $hasUniqueGuids &= empty($guids['_' . $guid]); $guids['_' . $guid] = true; + $author_names = ''; + if (is_array($authors)) { + foreach ($authors as $author) { + $author_names .= html_only_entity_decode(strip_tags($author->name == '' ? $author->email : $author->name)) . ', '; + } + } + $author_names = substr($author_names, 0, -2); $entry = new FreshRSS_Entry( $this->id(), $guid, $title === null ? '' : $title, - $author === null ? '' : html_only_entity_decode(strip_tags($author->name == null ? $author->email : $author->name)), + $author_names, $content === null ? '' : $content, $link === null ? '' : $link, $date ? $date : time() -- cgit v1.2.3 From d3f5bd840d513bc4820a919ef9e0f02b0263ff9c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 3 Sep 2018 20:48:04 +0200 Subject: Add mark-as-unread (#1995) * Add mark-as-unread https://github.com/FreshRSS/FreshRSS/issues/1966 * Change sentence https://github.com/FreshRSS/FreshRSS/pull/1995#discussion_r214515954 * Enable mark-as-unread only when unread articles are shown In order to prevent erroneous marking-as-unread. We might find a better logic later. * Disable instead of hide mark-as-unread option To make it easier to discover --- app/Controllers/entryController.php | 18 +++++++++--------- app/Models/EntryDAO.php | 24 ++++++++++++------------ app/i18n/cz/feedback.php | 5 ++++- app/i18n/cz/index.php | 1 + app/i18n/de/feedback.php | 5 ++++- app/i18n/de/index.php | 1 + app/i18n/en/feedback.php | 5 ++++- app/i18n/en/index.php | 1 + app/i18n/es/feedback.php | 5 ++++- app/i18n/es/index.php | 1 + app/i18n/fr/feedback.php | 5 ++++- app/i18n/fr/index.php | 3 ++- app/i18n/he/feedback.php | 5 ++++- app/i18n/he/index.php | 1 + app/i18n/it/feedback.php | 5 ++++- app/i18n/it/index.php | 1 + app/i18n/kr/feedback.php | 5 ++++- app/i18n/kr/index.php | 1 + app/i18n/nl/feedback.php | 5 ++++- app/i18n/nl/index.php | 1 + app/i18n/pt-br/feedback.php | 5 ++++- app/i18n/pt-br/index.php | 1 + app/i18n/ru/feedback.php | 5 ++++- app/i18n/ru/index.php | 1 + app/i18n/tr/feedback.php | 5 ++++- app/i18n/tr/index.php | 1 + app/i18n/zh-cn/feedback.php | 5 ++++- app/i18n/zh-cn/index.php | 1 + app/layout/nav_menu.phtml | 19 ++++++++++++++++--- p/themes/BlueLagoon/BlueLagoon.css | 3 +++ p/themes/Dark/dark.css | 3 +++ p/themes/Screwdriver/screwdriver.css | 3 +++ p/themes/base-theme/template.css | 3 +++ 33 files changed, 115 insertions(+), 38 deletions(-) (limited to 'app/Models') diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index 838ad56ce..16a15c447 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -40,6 +40,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { $get = Minz_Request::param('get'); $next_get = Minz_Request::param('nextGet', $get); $id_max = Minz_Request::param('idMax', 0); + $is_read = (bool)(Minz_Request::param('is_read', true)); FreshRSS_Context::$search = new FreshRSS_BooleanSearch(Minz_Request::param('search', '')); FreshRSS_Context::$state = Minz_Request::param('state', 0); @@ -63,39 +64,38 @@ class FreshRSS_entry_Controller extends Minz_ActionController { if (!$get) { // No get? Mark all entries as read (from $id_max) - $entryDAO->markReadEntries($id_max); + $entryDAO->markReadEntries($id_max, $is_read); } else { $type_get = $get[0]; $get = substr($get, 2); switch($type_get) { case 'c': - $entryDAO->markReadCat($get, $id_max, FreshRSS_Context::$search, FreshRSS_Context::$state); + $entryDAO->markReadCat($get, $id_max, FreshRSS_Context::$search, FreshRSS_Context::$state, $is_read); break; case 'f': - $entryDAO->markReadFeed($get, $id_max, FreshRSS_Context::$search, FreshRSS_Context::$state); + $entryDAO->markReadFeed($get, $id_max, FreshRSS_Context::$search, FreshRSS_Context::$state, $is_read); break; case 's': - $entryDAO->markReadEntries($id_max, true, 0, FreshRSS_Context::$search); + $entryDAO->markReadEntries($id_max, true, 0, FreshRSS_Context::$search, FreshRSS_Context::$state, $is_read); break; case 'a': - $entryDAO->markReadEntries($id_max, false, 0, FreshRSS_Context::$search, FreshRSS_Context::$state); + $entryDAO->markReadEntries($id_max, false, 0, FreshRSS_Context::$search, FreshRSS_Context::$state, $is_read); break; } if ($next_get !== 'a') { // Redirect to the correct page (category, feed or starred) - // Not "a" because it is the default value if nothing is - // given. + // Not "a" because it is the default value if nothing is given. $params['get'] = $next_get; } } } else { - $is_read = (bool)(Minz_Request::param('is_read', true)); $entryDAO->markRead($id, $is_read); } if (!$this->ajax) { - Minz_Request::good(_t('feedback.sub.feed.marked_read'), array( + Minz_Request::good(_t($is_read ? 'feedback.sub.articles.marked_read' : 'feedback.sub.articles.marked_unread'), + array( 'c' => 'index', 'a' => 'index', 'params' => $params, diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 73651187f..e17f6ff34 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -437,7 +437,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { * @param integer $priorityMin * @return integer affected rows */ - public function markReadEntries($idMax = 0, $onlyFavorites = false, $priorityMin = 0, $filters = null, $state = 0) { + public function markReadEntries($idMax = 0, $onlyFavorites = false, $priorityMin = 0, $filters = null, $state = 0, $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; @@ -445,14 +445,14 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id ' - . 'SET e.is_read=1 ' - . 'WHERE e.is_read=0 AND e.id <= ?'; + . 'SET e.is_read=? ' + . 'WHERE e.is_read <> ? AND e.id <= ?'; if ($onlyFavorites) { $sql .= ' AND e.is_favorite=1'; } elseif ($priorityMin >= 0) { $sql .= ' AND f.priority > ' . intval($priorityMin); } - $values = array($idMax); + $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); @@ -480,7 +480,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { * @param integer $idMax fail safe article ID * @return integer affected rows */ - public function markReadCat($id, $idMax = 0, $filters = null, $state = 0) { + public function markReadCat($id, $idMax = 0, $filters = null, $state = 0, $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; @@ -488,9 +488,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id ' - . 'SET e.is_read=1 ' - . 'WHERE f.category=? AND e.is_read=0 AND e.id <= ?'; - $values = array($id, $idMax); + . 'SET e.is_read=? ' + . 'WHERE f.category=? AND e.is_read <> ? AND e.id <= ?'; + $values = array($is_read ? 1 : 0, $id, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); @@ -518,7 +518,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { * @param integer $idMax fail safe article ID * @return integer affected rows */ - public function markReadFeed($id_feed, $idMax = 0, $filters = null, $state = 0) { + public function markReadFeed($id_feed, $idMax = 0, $filters = null, $state = 0, $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; @@ -527,9 +527,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $this->bd->beginTransaction(); $sql = 'UPDATE `' . $this->prefix . 'entry` ' - . 'SET is_read=1 ' - . 'WHERE id_feed=? AND is_read=0 AND id <= ?'; - $values = array($id_feed, $idMax); + . 'SET is_read=? ' + . 'WHERE id_feed=? AND is_read <> ? AND id <= ?'; + $values = array($is_read ? 1 : 0, $id_feed, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); diff --git a/app/i18n/cz/feedback.php b/app/i18n/cz/feedback.php index ff9c87d12..fe85a3599 100644 --- a/app/i18n/cz/feedback.php +++ b/app/i18n/cz/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Aktualizovat', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Kategorie %s byla vytvořena.', 'deleted' => 'Kategorie byla smazána.', @@ -74,7 +78,6 @@ return array( 'error' => 'Kanál nelze aktualizovat', 'internal_problem' => 'RSS kanál nelze přidat. Pro detaily zkontrolujte logy FreshRSS.', // @todo 'invalid_url' => 'URL %s není platné', - 'marked_read' => 'Kanály byly označeny jako přečtené', 'n_actualized' => '%d kanálů bylo aktualizováno', 'n_entries_deleted' => '%d článků bylo smazáno', 'no_refresh' => 'Nelze obnovit žádné kanály…', diff --git a/app/i18n/cz/index.php b/app/i18n/cz/index.php index cb0e5955d..48a28d4da 100644 --- a/app/i18n/cz/index.php +++ b/app/i18n/cz/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Označit vše jako přečtené', 'mark_cat_read' => 'Označit kategorii jako přečtenou', 'mark_feed_read' => 'Označit kanál jako přečtený', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Nové nejdříve', 'non-starred' => 'Zobrazit vše vyjma oblíbených', 'normal_view' => 'Normální', diff --git a/app/i18n/de/feedback.php b/app/i18n/de/feedback.php index 2c46bbe56..c20f58487 100644 --- a/app/i18n/de/feedback.php +++ b/app/i18n/de/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Aktualisieren', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Die Kategorie %s ist erstellt worden.', 'deleted' => 'Die Kategorie ist gelöscht worden.', @@ -74,7 +78,6 @@ return array( 'error' => 'Der Feed kann nicht aktualisiert werden', 'internal_problem' => 'Der RSS-Feed konnte nicht hinzugefügt werden. Für Details prüfen Sie die FreshRSS-Protokolle.', // @todo 'invalid_url' => 'Die URL %s ist ungültig', - 'marked_read' => 'Die Feeds sind als gelesen markiert worden', 'n_actualized' => 'Die %d Feeds sind aktualisiert worden', 'n_entries_deleted' => 'Die %d Artikel sind gelöscht worden', 'no_refresh' => 'Es gibt keinen Feed zum Aktualisieren…', diff --git a/app/i18n/de/index.php b/app/i18n/de/index.php index df92d8085..1fa3e3933 100644 --- a/app/i18n/de/index.php +++ b/app/i18n/de/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Alle als gelesen markieren', 'mark_cat_read' => 'Kategorie als gelesen markieren', 'mark_feed_read' => 'Feed als gelesen markieren', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Neuere zuerst', 'non-starred' => 'Alle außer Favoriten zeigen', 'normal_view' => 'Normale Ansicht', diff --git a/app/i18n/en/feedback.php b/app/i18n/en/feedback.php index a7fbda3a0..634b547f7 100644 --- a/app/i18n/en/feedback.php +++ b/app/i18n/en/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Updating', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', + 'marked_unread' => 'The articles have been marked as unread.', + ), 'category' => array( 'created' => 'Category %s has been created.', 'deleted' => 'Category has been deleted.', @@ -74,7 +78,6 @@ return array( 'error' => 'Feed cannot be updated', 'internal_problem' => 'The newsfeed could not be added. Check FreshRSS logs for details. You can try force adding by appending #force_feed to the URL.', 'invalid_url' => 'URL %s is invalid', - 'marked_read' => 'Feeds have been marked as read', 'n_actualized' => '%d feeds have been updated', 'n_entries_deleted' => '%d articles have been deleted', 'no_refresh' => 'There is no feed to refresh…', diff --git a/app/i18n/en/index.php b/app/i18n/en/index.php index 29dccc9ed..1c13abdb7 100644 --- a/app/i18n/en/index.php +++ b/app/i18n/en/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Mark all as read', 'mark_cat_read' => 'Mark category as read', 'mark_feed_read' => 'Mark feed as read', + 'mark_selection_unread' => 'Mark selection as unread', 'newer_first' => 'Newer first', 'non-starred' => 'Show non-favourites', 'normal_view' => 'Normal view', diff --git a/app/i18n/es/feedback.php b/app/i18n/es/feedback.php index 627c86afc..38548e901 100755 --- a/app/i18n/es/feedback.php +++ b/app/i18n/es/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Actualización', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Se ha creado la categoría %s.', 'deleted' => 'Se ha eliminado la categoría.', @@ -74,7 +78,6 @@ return array( 'error' => 'No es posible actualizar la fuente', 'internal_problem' => 'No ha sido posible agregar la fuente RSS. Revisa el registro de FreshRSS para más información.', // @todo 'invalid_url' => 'La URL %s es inválida', - 'marked_read' => 'Fuentes marcadas como leídas', 'n_actualized' => 'Se han actualiado %d fuentes', 'n_entries_deleted' => 'Se han eliminado %d artículos', 'no_refresh' => 'No hay fuente a actualizar…', diff --git a/app/i18n/es/index.php b/app/i18n/es/index.php index 03054e23a..c88152459 100755 --- a/app/i18n/es/index.php +++ b/app/i18n/es/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Marcar todo como leído', 'mark_cat_read' => 'Marcar categoría como leída', 'mark_feed_read' => 'Marcar fuente como leída', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Nuevos primero', 'non-starred' => 'Mostrar todos menos los favoritos', 'normal_view' => 'Vista normal', diff --git a/app/i18n/fr/feedback.php b/app/i18n/fr/feedback.php index 2443ad30a..dafdd353d 100644 --- a/app/i18n/fr/feedback.php +++ b/app/i18n/fr/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Actualiser', + 'articles' => array( + 'marked_read' => 'Les articles sélectionnés ont été marqués comme lus.', + 'marked_unread' => 'Les articles sélectionnés ont été marqués comme non-lus.', + ), 'category' => array( 'created' => 'La catégorie %s a été créée.', 'deleted' => 'La catégorie a été supprimée.', @@ -74,7 +78,6 @@ return array( 'error' => 'Une erreur est survenue', 'internal_problem' => 'Le flux ne peut pas être ajouté. Consulter les logs de FreshRSS pour plus de détails. Vous pouvez essayer de forcer l’ajout par addition de #force_feed à l’URL.', 'invalid_url' => 'L’url %s est invalide.', - 'marked_read' => 'Les flux ont été marqués comme lus.', 'n_actualized' => '%d flux ont été mis à jour.', 'n_entries_deleted' => '%d articles ont été supprimés.', 'no_refresh' => 'Il n’y a aucun flux à actualiser…', diff --git a/app/i18n/fr/index.php b/app/i18n/fr/index.php index 0a3a4abb3..bb0d14faf 100644 --- a/app/i18n/fr/index.php +++ b/app/i18n/fr/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Tout marquer comme lu', 'mark_cat_read' => 'Marquer la catégorie comme lue', 'mark_feed_read' => 'Marquer le flux comme lu', + 'mark_selection_unread' => 'Marquer la sélection comme non-lue', 'newer_first' => 'Plus récents en premier', 'non-starred' => 'Afficher les non-favoris', 'normal_view' => 'Vue normale', @@ -52,7 +53,7 @@ return array( 'starred' => 'Afficher les favoris', 'stats' => 'Statistiques', 'subscription' => 'Gestion des abonnements', - 'unread' => 'Afficher les non lus', + 'unread' => 'Afficher les non-lus', ), 'share' => 'Partager', 'tag' => array( diff --git a/app/i18n/he/feedback.php b/app/i18n/he/feedback.php index 4b79b0d45..369714795 100644 --- a/app/i18n/he/feedback.php +++ b/app/i18n/he/feedback.php @@ -53,6 +53,10 @@ return array( ), 'sub' => array( 'actualize' => 'מימוש', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Category %s has been created.', // @todo 'deleted' => 'Category has been deleted.', // @todo @@ -75,7 +79,6 @@ return array( 'error' => 'Feed cannot be updated', // @todo 'internal_problem' => 'אין אפשרות להוסיף את ההזנה. בדקו את הלוגים לפרטים.', // @todo 'invalid_url' => 'URL %s אינו תקין', - 'marked_read' => 'הזנות סומנו כנקראו', 'n_actualized' => '%d הזנות עודכנו', 'n_entries_deleted' => '%d המאמרים נמחקו', 'no_refresh' => 'אין הזנה שניתן לרענן…', diff --git a/app/i18n/he/index.php b/app/i18n/he/index.php index cef07eaf8..8ca6e76f7 100644 --- a/app/i18n/he/index.php +++ b/app/i18n/he/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'סימון הכל כנקרא', 'mark_cat_read' => 'סימון קטגוריה כנקראה', 'mark_feed_read' => 'סימון הזנה כנקראה', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'חדשים בראש', 'non-starred' => 'הצגת הכל פרט למועדפים', 'normal_view' => 'תצוגה רגילה', diff --git a/app/i18n/it/feedback.php b/app/i18n/it/feedback.php index 934666aa5..b0f3a814a 100644 --- a/app/i18n/it/feedback.php +++ b/app/i18n/it/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Aggiorna', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Categoria %s creata.', 'deleted' => 'Categoria cancellata', @@ -74,7 +78,6 @@ return array( 'error' => 'Feed non aggiornato', 'internal_problem' => 'RSS feed non aggiunto. Verifica i logs per dettagli.', // @todo 'invalid_url' => 'URL %s non valido', - 'marked_read' => 'Feeds segnati come letti', 'n_actualized' => '%d feeds aggiornati', 'n_entries_deleted' => '%d articoli cancellati', 'no_refresh' => 'Nessun aggiornamento disponibile…', diff --git a/app/i18n/it/index.php b/app/i18n/it/index.php index d79502c79..718093327 100644 --- a/app/i18n/it/index.php +++ b/app/i18n/it/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Segna tutto come letto', 'mark_cat_read' => 'Segna la categoria come letta', 'mark_feed_read' => 'Segna il feed come letto', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Mostra prima i recenti', 'non-starred' => 'Escludi preferiti', 'normal_view' => 'Vista elenco', diff --git a/app/i18n/kr/feedback.php b/app/i18n/kr/feedback.php index ec2c812b9..12cd673ff 100644 --- a/app/i18n/kr/feedback.php +++ b/app/i18n/kr/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => '피드를 가져오는 중입니다', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => '%s 카테고리가 생성되었습니다.', 'deleted' => '카테고리가 삭제되었습니다.', @@ -74,7 +78,6 @@ return array( 'error' => '피드를 변경할 수 없습니다', 'internal_problem' => 'RSS 피드를 추가할 수 없습니다. 자세한 내용은 FreshRSS 로그를 참고하세요.', 'invalid_url' => 'URL (%s)이 유효하지 않습니다', - 'marked_read' => '피드가 읽음으로 표시되었습니다', 'n_actualized' => '%d 개의 피드에서 새 글을 가져왔습니다', 'n_entries_deleted' => '%d 개의 글을 삭제했습니다', 'no_refresh' => '새 글을 가져올 피드가 없습니다…', diff --git a/app/i18n/kr/index.php b/app/i18n/kr/index.php index cc03f91c2..cb9684dff 100644 --- a/app/i18n/kr/index.php +++ b/app/i18n/kr/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => '모두 읽음으로 표시', 'mark_cat_read' => '카테고리를 읽음으로 표시', 'mark_feed_read' => '피드를 읽음으로 표시', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => '최근 글 먼저', 'non-starred' => '즐겨찾기를 제외하고 표시', 'normal_view' => '일반 모드', diff --git a/app/i18n/nl/feedback.php b/app/i18n/nl/feedback.php index e73f2f7bd..756cfa9a2 100644 --- a/app/i18n/nl/feedback.php +++ b/app/i18n/nl/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Actualiseren', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Categorie %s is gemaakt.', 'deleted' => 'Categorie is verwijderd.', @@ -74,7 +78,6 @@ return array( 'error' => 'Feed kan niet worden vernieuwd', 'internal_problem' => 'De feed kon niet worden toegevoegd. Controleer de FreshRSS-logbestanden voor details. Toevoegen forceren kan worden geprobeerd door #force_feed aan de URL toe te voegen.', 'invalid_url' => 'URL %s is ongeldig', - 'marked_read' => 'Feeds zijn gemarkeerd als gelezen', 'n_actualized' => '%d feeds zijn vernieuwd', 'n_entries_deleted' => '%d artikelen zijn verwijderd', 'no_refresh' => 'Er is geen feed om te vernieuwen…', diff --git a/app/i18n/nl/index.php b/app/i18n/nl/index.php index e0184a0d0..7b81a00e2 100644 --- a/app/i18n/nl/index.php +++ b/app/i18n/nl/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Markeer alles als gelezen', 'mark_cat_read' => 'Markeer categorie als gelezen', 'mark_feed_read' => 'Markeer feed als gelezen', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Nieuwste eerst', 'non-starred' => 'Laat alles zien behalve favorieten', 'normal_view' => 'Normale weergave', diff --git a/app/i18n/pt-br/feedback.php b/app/i18n/pt-br/feedback.php index 2057cf985..a2d66384e 100644 --- a/app/i18n/pt-br/feedback.php +++ b/app/i18n/pt-br/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Atualizando', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Categoria %s foi criada.', 'deleted' => 'Categoria foi deletada.', @@ -74,7 +78,6 @@ return array( 'error' => 'O feed não pode ser atualizado', 'internal_problem' => 'O RSS feed não pôde ser adicionado. Verifique os FreshRSS logs para detalhes.', // @todo 'invalid_url' => 'URL %s é inválida', - 'marked_read' => 'Feeds foram marcados como lidos', 'n_actualized' => '%d feeds foram atualizados', 'n_entries_deleted' => '%d artigos foram deletados', 'no_refresh' => 'Não há feed para atualizar…', diff --git a/app/i18n/pt-br/index.php b/app/i18n/pt-br/index.php index 610f00840..2eff8d948 100644 --- a/app/i18n/pt-br/index.php +++ b/app/i18n/pt-br/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Marcar todos como lidos', 'mark_cat_read' => 'Marcar categoria como lida', 'mark_feed_read' => 'Marcar feed com lido', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Novos primeiro', 'non-starred' => 'Mostrar todos, exceto favoritos', 'normal_view' => 'visualização normal', diff --git a/app/i18n/ru/feedback.php b/app/i18n/ru/feedback.php index 6d4e5e3fe..693a40b34 100644 --- a/app/i18n/ru/feedback.php +++ b/app/i18n/ru/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Actualise', //TODO + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Category %s has been created.', //TODO 'deleted' => 'Category has been deleted.', //TODO @@ -74,7 +78,6 @@ return array( 'error' => 'Feed cannot be updated', //TODO 'internal_problem' => 'The newsfeed could not be added. Check FreshRSS logs for details. You can try force adding by appending #force_feed to the URL.', //TODO 'invalid_url' => 'URL %s is invalid', //TODO - 'marked_read' => 'Feeds have been marked as read', //TODO 'n_actualized' => '%d feeds have been updated', //TODO 'n_entries_deleted' => '%d articles have been deleted', //TODO 'no_refresh' => 'There is no feed to refresh…', //TODO diff --git a/app/i18n/ru/index.php b/app/i18n/ru/index.php index eb6413e3c..9bb327786 100644 --- a/app/i18n/ru/index.php +++ b/app/i18n/ru/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Mark all as read', 'mark_cat_read' => 'Mark category as read', 'mark_feed_read' => 'Mark feed as read', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Newer first', 'non-starred' => 'Show all but favorites', 'normal_view' => 'Normal view', diff --git a/app/i18n/tr/feedback.php b/app/i18n/tr/feedback.php index df7d1b264..278abe978 100644 --- a/app/i18n/tr/feedback.php +++ b/app/i18n/tr/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => 'Güncelleme', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => 'Kategori %s oluşturuldu.', 'deleted' => 'Kategori silindi.', @@ -74,7 +78,6 @@ return array( 'error' => 'Akış güncellenemiyor', 'internal_problem' => 'RSS akışı eklenemiyor. Detaylar için FreshRSS log kayıtlarını kontrol edin.', // @todo 'invalid_url' => 'URL %s geçersiz', - 'marked_read' => 'Akışlar okundu olarak işaretlendi', 'n_actualized' => '%d akışları güncellendi', 'n_entries_deleted' => '%d makaleleri silindi', 'no_refresh' => 'Yenilenecek akış yok…', diff --git a/app/i18n/tr/index.php b/app/i18n/tr/index.php index cb36d6717..1357c05e7 100644 --- a/app/i18n/tr/index.php +++ b/app/i18n/tr/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => 'Hepsini okundu olarak işaretle', 'mark_cat_read' => 'Kategoriyi okundu olarak işaretle', 'mark_feed_read' => 'Akışı okundu olarak işaretle', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => 'Önce yeniler', 'non-starred' => 'Favori dışındakileri göster', 'normal_view' => 'Normal görünüm', diff --git a/app/i18n/zh-cn/feedback.php b/app/i18n/zh-cn/feedback.php index 1db879891..e9f7b4aac 100644 --- a/app/i18n/zh-cn/feedback.php +++ b/app/i18n/zh-cn/feedback.php @@ -52,6 +52,10 @@ return array( ), 'sub' => array( 'actualize' => '获取', + 'articles' => array( + 'marked_read' => 'The selected articles have been marked as read.', //TODO + 'marked_unread' => 'The articles have been marked as unread.', //TODO + ), 'category' => array( 'created' => '分类 %s 已创建。', 'deleted' => '分类已删除。', @@ -74,7 +78,6 @@ return array( 'error' => 'RSS 源更新失败', 'internal_problem' => 'RSS 源添加失败。检查 FreshRSS 日志 查看详情。', // @todo 'invalid_url' => 'URL %s 无效', - 'marked_read' => 'RSS 源已被设为已读', 'n_actualized' => '%d 个 RSS 源已更新', 'n_entries_deleted' => '%d 篇文章已删除', 'no_refresh' => '没有可刷新的 RSS 源…', diff --git a/app/i18n/zh-cn/index.php b/app/i18n/zh-cn/index.php index 6729524f5..2b76961ef 100644 --- a/app/i18n/zh-cn/index.php +++ b/app/i18n/zh-cn/index.php @@ -40,6 +40,7 @@ return array( 'mark_all_read' => '全部设为已读', 'mark_cat_read' => '此分类设为已读', 'mark_feed_read' => '此源设为已读', + 'mark_selection_unread' => 'Mark selection as unread', //TODO 'newer_first' => '由新到旧', 'non-starred' => '显示未收藏', 'normal_view' => '普通视图', diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index d1f3bed43..88f882db9 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -62,9 +62,10 @@ FreshRSS_Context::$id_max, 'search' => htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), 'state' => FreshRSS_Context::$state, - ) + ), ); + + $mark_unread_url = $mark_read_url; + $mark_unread_url['params']['is_read'] = false; + $mark_unread_url['params']['nextGet'] = $get; ?> diff --git a/p/themes/BlueLagoon/BlueLagoon.css b/p/themes/BlueLagoon/BlueLagoon.css index 186258752..424970501 100644 --- a/p/themes/BlueLagoon/BlueLagoon.css +++ b/p/themes/BlueLagoon/BlueLagoon.css @@ -115,6 +115,9 @@ form th { } /*=== Buttons */ +button.as-link[disabled] { + color:#555 !important; +} .dropdown-menu .input select, .dropdown-menu .input input { background:#444; diff --git a/p/themes/Dark/dark.css b/p/themes/Dark/dark.css index 348b00009..38a78a277 100644 --- a/p/themes/Dark/dark.css +++ b/p/themes/Dark/dark.css @@ -113,6 +113,9 @@ form th { } /*=== Buttons */ +button.as-link[disabled] { + color:#445 !important; +} .stick { vertical-align: middle; font-size: 0; diff --git a/p/themes/Screwdriver/screwdriver.css b/p/themes/Screwdriver/screwdriver.css index 969695f13..a142c3860 100644 --- a/p/themes/Screwdriver/screwdriver.css +++ b/p/themes/Screwdriver/screwdriver.css @@ -115,6 +115,9 @@ form th { } /*=== Buttons */ +button.as-link[disabled] { + color:#555 !important; +} .dropdown-menu .input select, .dropdown-menu .input input { background:#444; diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 7f2e7e828..26143a5d5 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -118,6 +118,9 @@ button.as-link:active { font-size: 1.1em; text-align: left; } +button.as-link[disabled] { + color:#DDD !important; +} /*=== Tables */ table { -- cgit v1.2.3 From b5dfb5538937e95a95e291cafe6234522d9c93d4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 Sep 2018 19:23:16 +0200 Subject: Fix SQLite and PostgreSQL (#2007) Regression from https://github.com/FreshRSS/FreshRSS/pull/1995 --- app/Models/EntryDAOSQLite.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/Models') diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index cca970e36..30d849cf4 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -159,19 +159,19 @@ DROP TABLE IF EXISTS `tmp`; * @param integer $priorityMin * @return integer affected rows */ - public function markReadEntries($idMax = 0, $onlyFavorites = false, $priorityMin = 0, $filters = null, $state = 0) { + public function markReadEntries($idMax = 0, $onlyFavorites = false, $priorityMin = 0, $filters = null, $state = 0, $is_read = true) { if ($idMax == 0) { $idMax = time() . '000000'; Minz_Log::debug('Calling markReadEntries(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` SET is_read=1 WHERE is_read=0 AND id <= ?'; + $sql = 'UPDATE `' . $this->prefix . 'entry` SET is_read = ? WHERE is_read <> ? AND id <= ?'; if ($onlyFavorites) { $sql .= ' AND is_favorite=1'; } elseif ($priorityMin >= 0) { $sql .= ' AND id_feed IN (SELECT f.id FROM `' . $this->prefix . 'feed` f WHERE f.priority > ' . intval($priorityMin) . ')'; } - $values = array($idMax); + $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); @@ -199,17 +199,17 @@ DROP TABLE IF EXISTS `tmp`; * @param integer $idMax fail safe article ID * @return integer affected rows */ - public function markReadCat($id, $idMax = 0, $filters = null, $state = 0) { + public function markReadCat($id, $idMax = 0, $filters = null, $state = 0, $is_read = true) { if ($idMax == 0) { $idMax = time() . '000000'; Minz_Log::debug('Calling markReadCat(0) is deprecated!'); } $sql = 'UPDATE `' . $this->prefix . 'entry` ' - . 'SET is_read=1 ' - . 'WHERE is_read=0 AND id <= ? AND ' + . 'SET is_read = ? ' + . 'WHERE is_read <> ? AND id <= ? AND ' . 'id_feed IN (SELECT f.id FROM `' . $this->prefix . 'feed` f WHERE f.category=?)'; - $values = array($idMax, $id); + $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); -- cgit v1.2.3 From 1d49dda233836f79ceaa4551cdb35d749788a369 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 Sep 2018 20:50:59 +0200 Subject: Missing touch for SQLite and PostgreSQL (#2008) For last user activity. Forgotten in https://github.com/FreshRSS/FreshRSS/pull/1358 --- app/Models/EntryDAOSQLite.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/Models') diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 30d849cf4..944de8470 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -101,6 +101,7 @@ DROP TABLE IF EXISTS `tmp`; * @return integer affected rows */ public function markRead($ids, $is_read = true) { + FreshRSS_UserDAO::touch(); if (is_array($ids)) { //Many IDs at once (used by API) if (true) { //Speed heuristics //TODO: Not implemented yet for SQLite (so always call IDs one by one) $affected = 0; @@ -160,6 +161,7 @@ DROP TABLE IF EXISTS `tmp`; * @return integer affected rows */ public function markReadEntries($idMax = 0, $onlyFavorites = false, $priorityMin = 0, $filters = null, $state = 0, $is_read = true) { + FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; Minz_Log::debug('Calling markReadEntries(0) is deprecated!'); @@ -200,6 +202,7 @@ DROP TABLE IF EXISTS `tmp`; * @return integer affected rows */ public function markReadCat($id, $idMax = 0, $filters = null, $state = 0, $is_read = true) { + FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; Minz_Log::debug('Calling markReadCat(0) is deprecated!'); -- cgit v1.2.3 From c65f5358904c585ce144885be2fbcd960adaf1e6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 Sep 2018 23:05:56 +0200 Subject: Fix count unreads in SQLite (#2009) * Fix count unreads in SQLite Was wrong in e.g. `./cli/user-info.php` because UNION output order in MySQL and SQLite is differents... * Changelog 2009 --- CHANGELOG.md | 1 + app/Models/EntryDAO.php | 2 ++ 2 files changed, 3 insertions(+) (limited to 'app/Models') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0112ae636..2466c1088 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * Fix Fever API to allow 32-bit architectures [#1962](https://github.com/FreshRSS/FreshRSS/issues/1962) * Fix CSS font bug for *Origine-compact* theme [#1990](https://github.com/FreshRSS/FreshRSS/issues/1990) * Fix last user activity for SQLite and PostgreSQL [#2008](https://github.com/FreshRSS/FreshRSS/pull/2008) + * Fix article counts with SQLite [#2009](https://github.com/FreshRSS/FreshRSS/pull/2009) * Security * Avoid feed credentials in logs [#1949](https://github.com/FreshRSS/FreshRSS/pull/1949) * UI diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index e17f6ff34..f0e164995 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -909,6 +909,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $stm = $this->bd->prepare($sql); $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); + rsort($res); $all = empty($res[0]) ? 0 : $res[0]; $unread = empty($res[1]) ? 0 : $res[1]; return array('all' => $all, 'unread' => $unread, 'read' => $all - $unread); @@ -963,6 +964,7 @@ SQL; $stm = $this->bd->prepare($sql); $stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL)); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); + rsort($res); $all = empty($res[0]) ? 0 : $res[0]; $unread = empty($res[1]) ? 0 : $res[1]; return array('all' => $all, 'unread' => $unread, 'read' => $all - $unread); -- cgit v1.2.3