From 21dfbd0910913373c037f6499deea8d2ddc38616 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 31 Mar 2019 18:41:39 +0200 Subject: Start version 1.14.1-dev --- CHANGELOG.md | 4 ++++ constants.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f43d470a8..b22bbb753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # FreshRSS changelog +## 2019-0X-XX FreshRSS 1.14.1-dev + + + ## 2019-03-31 FreshRSS 1.14.0 * Features diff --git a/constants.php b/constants.php index 1432ced48..f8befdda0 100644 --- a/constants.php +++ b/constants.php @@ -2,7 +2,7 @@ //NB: Do not edit; use ./constants.local.php instead. // -define('FRESHRSS_VERSION', '1.14.0'); +define('FRESHRSS_VERSION', '1.14.1-dev'); define('FRESHRSS_WEBSITE', 'https://freshrss.org'); define('FRESHRSS_WIKI', 'https://freshrss.github.io/FreshRSS/'); -- cgit v1.2.3 From 694af5434ea79c0c7e06d0be5b771751f77fb9df Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 1 Apr 2019 12:16:02 +0200 Subject: [i18n, nl] Various improvements to Dutch translation (#2312) * [i18n, nl] Various improvements to Dutch translation The text for the "Show categories unfolded by default" was incorrect, cf. #2309. Also fixed a few typos and some minor stylistic changes. * also fix that typo with the missing space --- app/i18n/nl/admin.php | 4 ++-- app/i18n/nl/conf.php | 22 +++++++++++----------- app/i18n/nl/feedback.php | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php index c6fd1dc9e..e5d126eb8 100644 --- a/app/i18n/nl/admin.php +++ b/app/i18n/nl/admin.php @@ -160,8 +160,8 @@ return array( '_' => 'Systeem configuratie', 'auto-update-url' => 'Automatische update server URL', 'instance-name' => 'Voorbeeld naam', - 'max-categories' => 'Categoriën limiet per gebruiker', - 'max-feeds' => 'Feed limiet per gebruiker', + 'max-categories' => 'Categorielimiet per gebruiker', + 'max-feeds' => 'Feedlimiet per gebruiker', 'cookie-duration' => array( 'help' => 'in seconden', 'number' => 'Tijdsduur om ingelogd te blijven', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index 8e6a59d56..fa84ae184 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -91,18 +91,18 @@ return array( 'auto_load_more' => 'Laad volgende artikel onderaan de pagina', 'auto_remove_article' => 'Verberg artikel na lezen', 'confirm_enabled' => 'Toon een bevestigings dialoog op “markeer alles als gelezen” acties', - 'display_articles_unfolded' => 'Toon artikelen uitgeklapt als standaard', - 'display_categories_unfolded' => 'Toon categoriën ingeklapt als standaard', - 'hide_read_feeds' => 'Verberg categoriën en feeds zonder ongelezen artikelen (werkt niet met “Toon alle artikelen” configuratie)', + 'display_articles_unfolded' => 'Artikelen standaard uitklappen', + 'display_categories_unfolded' => 'Categorieën standaard uitklappen', + 'hide_read_feeds' => 'Categorieën en feeds zonder ongelezen artikelen verbergen (werkt niet met “Toon alle artikelen” configuratie)', 'img_with_lazyload' => 'Gebruik "lazy load" methode om afbeeldingen te laden', 'jump_next' => 'Ga naar volgende ongelezen (feed of categorie)', 'mark_updated_article_unread' => 'Markeer vernieuwd artikel als ongelezen', 'number_divided_when_reader' => 'Gedeeld door 2 in de lees modus.', 'read' => array( - 'article_open_on_website' => 'Als het artikel is geopend op de originele website', - 'article_viewed' => 'Als het artikel is bekeken', - 'scroll' => 'Tijdens scrollen', - 'upon_reception' => 'Tijdens ontvangst van het artikel', + 'article_open_on_website' => 'als het artikel wordt geopend op de originele website', + 'article_viewed' => 'als het artikel wordt bekeken', + 'scroll' => 'tijdens het scrollen', + 'upon_reception' => 'bij ontvangst van het artikel', 'when' => 'Markeer artikel als gelezen…', ), 'show' => array( @@ -145,8 +145,8 @@ return array( 'wallabag' => 'wallabag', ), 'shortcut' => array( - '_' => 'Shortcuts', - 'article_action' => 'Artikel acties', + '_' => 'Snelkoppelingen', + 'article_action' => 'Artikelacties', 'auto_share' => 'Delen', 'auto_share_help' => 'Als er slechts één deelmethode is, dan wordt die gebruikt. Anders zijn ze toegankelijk met hun nummer.', 'close_dropdown' => 'Sluit menu', @@ -161,8 +161,8 @@ return array( 'mark_favorite' => 'Markeer als favoriet', 'mark_read' => 'Markeer als gelezen', 'navigation' => 'Navigatie', - 'navigation_help' => 'Met de "Shift" toets, kunt u navigatie verwijzingen voor feeds gebruiken.
Met de "Alt" toets, kunt u navigatie verwijzingen voor categoriën gebruiken.', - 'navigation_no_mod_help' => 'De volgende navigatiesnelkoppelingen ondersteunen geen besturingstoetsen.', + 'navigation_help' => 'Met de "Shift" toets worden navigatieverwijzingen op feeds toegepast.
Met de "Alt" toets worden navigatieverwijzingen op categorieën toegepast.', + 'navigation_no_mod_help' => 'De volgende navigatiesnelkoppelingen ondersteunen geen toetsencombinaties.', 'next_article' => 'Spring naar volgende artikel', 'normal_view' => 'Schakel naar gewoon aanzicht', 'other_action' => 'Andere acties', diff --git a/app/i18n/nl/feedback.php b/app/i18n/nl/feedback.php index 07ac7e89d..25378360b 100644 --- a/app/i18n/nl/feedback.php +++ b/app/i18n/nl/feedback.php @@ -70,15 +70,15 @@ return array( 'no_name' => 'Categorie naam mag niet leeg zijn.', 'not_delete_default' => 'U kunt de standaard categorie niet verwijderen!', 'not_exist' => 'De categorie bestaat niet!', - 'over_max' => 'U hebt het maximale aantal categoriën bereikt (%d)', - 'updated' => 'Categorie is vernieuwd.', + 'over_max' => 'Maximum aantal categorieën bereikt (%d)', + 'updated' => 'Categorie vernieuwd.', ), 'feed' => array( - 'actualized' => '%s is vernieuwd', - 'actualizeds' => 'RSS feeds zijn vernieuwd', - 'added' => 'RSS feed %s is toegevoegd', - 'already_subscribed' => 'U bent al geabonneerd op %s', - 'deleted' => 'Feed is verwijderd', + 'actualized' => '%s vernieuwd', + 'actualizeds' => 'RSS feeds vernieuwd', + 'added' => 'RSS feed %s toegevoegd', + 'already_subscribed' => 'Al geabonneerd op %s', + 'deleted' => 'Feed verwijderd', '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', @@ -86,7 +86,7 @@ return array( 'n_entries_deleted' => '%d artikelen zijn verwijderd', 'no_refresh' => 'Er is geen feed om te vernieuwen…', 'not_added' => '%s kon niet worden toegevoegd', - 'over_max' => 'U hebt het maximale aantal feeds bereikt(%d)', + 'over_max' => 'Maximum aantal feeds bereikt (%d)', 'updated' => 'Feed is vernieuwd', ), 'purge_completed' => 'Opschonen klaar (%d artikelen verwijderd)', -- cgit v1.2.3 From e5c8d52aa1ef5a624512b5faf64ea30697ef7e4c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 1 Apr 2019 23:43:20 +0200 Subject: Fix ASC load more (#2318) https://github.com/FreshRSS/FreshRSS/issues/2314 --- p/scripts/main.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index f59976b39..04bf50c81 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1286,12 +1286,11 @@ function load_more_posts() { paginationNew = streamAdopted.querySelector('.pagination'); formPagination.replaceChild(paginationNew, paginationOld); - if (context.display_order === 'ASC') { - document.querySelector('#nav_menu_read_all .read_all').formAction = - document.getElementById('bigMarkAsRead').formAction; - } else { - const bigMarkAsRead = document.getElementById('bigMarkAsRead'); - if (bigMarkAsRead) { + const bigMarkAsRead = document.getElementById('bigMarkAsRead'); + if (bigMarkAsRead) { + if (context.display_order === 'ASC') { + document.querySelector('#nav_menu_read_all .read_all').formAction = bigMarkAsRead.formAction; + } else { bigMarkAsRead.formAction = document.querySelector('#nav_menu_read_all .read_all').formAction; } } @@ -1305,8 +1304,7 @@ function load_more_posts() { init_load_more(box_load_more); - const bigMarkAsRead = document.getElementById('bigMarkAsRead'), - div_load_more = document.getElementById('load_more'); + const div_load_more = document.getElementById('load_more'); if (bigMarkAsRead) { bigMarkAsRead.removeAttribute('disabled'); } -- cgit v1.2.3 From c2a339f2f8a5a9a44d5feaaa8a000f027873d7da Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 1 Apr 2019 23:47:36 +0200 Subject: [CI] Lint JS scripts with jshint (#2315) --- .jshintignore | 4 ++++ .jshintrc | 8 ++++++++ .travis.yml | 9 +++++++++ p/scripts/install.js | 14 +++++++------- 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 .jshintignore create mode 100644 .jshintrc diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000000000..80bbc5b89 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,4 @@ +node_modules +p/scripts/bcrypt.min.js +p/scripts/flotr2.min.js +p/scripts/jquery.min.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000000000..07d282b1c --- /dev/null +++ b/.jshintrc @@ -0,0 +1,8 @@ +{ + "esversion" : 6, + "browser" : true, + "globals": { + "confirm": true, + "console": true + } +} diff --git a/.travis.yml b/.travis.yml index 44bc59e3f..1ec2aeb65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,15 @@ matrix: dist: precise - php: "7.2" env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no + - language: node_js + node_js: + - "node" + php: + # none + install: + - npm install jshint + script: + - node_modules/jshint/bin/jshint . allow_failures: - env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no - dist: precise diff --git a/p/scripts/install.js b/p/scripts/install.js index b7975fd6e..967d27627 100644 --- a/p/scripts/install.js +++ b/p/scripts/install.js @@ -1,15 +1,15 @@ "use strict"; /* jshint globalstrict: true */ -function show_password() { - var button = this; +function show_password(ev) { + var button = ev.target; var passwordField = document.getElementById(button.getAttribute('data-toggle')); passwordField.setAttribute('type', 'text'); button.className += ' active'; return false; } -function hide_password() { - var button = this; +function hide_password(ev) { + var button = ev.target; var passwordField = document.getElementById(button.getAttribute('data-toggle')); passwordField.setAttribute('type', 'password'); button.className = button.className.replace(/(?:^|\s)active(?!\S)/g , ''); @@ -61,10 +61,10 @@ if (bd_type) { bd_type.addEventListener('change', mySqlShowHide); } -function ask_confirmation(e) { - var str_confirmation = this.getAttribute('data-str-confirm'); +function ask_confirmation(ev) { + var str_confirmation = ev.target.getAttribute('data-str-confirm'); if (!confirm(str_confirmation)) { - e.preventDefault(); + ev.preventDefault(); } } var confirms = document.getElementsByClassName('confirm'); -- cgit v1.2.3 From 9fab63765e20932852cb2bebaa4cca32c27d96de Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 1 Apr 2019 23:49:32 +0200 Subject: [CI] Add PHP 7.3 to Travis configuration (#2317) This also requires an update of phpcs, since the old version won't run on PHP 7.3. By setting setting the tab-width to 40 it works around the behavior introduced in https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 which erroneously interprets positioning spaces as indentation. ("If the line started with tabs, but had spaces after that, no error was thrown at all.") That makes any line lengths checks ineffective, but I think line length checks aren't very useful anyway. They're basically just a (very!) rough indication that you might want to consider some refactoring. --- .travis.yml | 15 ++++++++------- phpcs.xml | 7 ++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ec2aeb65..dbd4eb8f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,16 @@ language: php php: - - '5.4' - - '5.5' - - '5.6' - - '7.0' - - '7.1' - - '7.2' + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 install: # newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 - - composer global require squizlabs/php_codesniffer "<=3.0.0RC4" + - composer global require squizlabs/php_codesniffer script: - phpenv rehash diff --git a/phpcs.xml b/phpcs.xml index d79e2a4d9..c6cc44e80 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,7 +2,7 @@ Created with the PHP Coding Standard Generator. https://edorian.github.com/php-coding-standard-generator/ - + ./static ./vendor ./lib/SimplePie/ @@ -33,8 +33,9 @@ ./app/SQL/install.sql.mysql.php ./app/SQL/install.sql.pgsql.php - - + + + -- cgit v1.2.3 From d67465a4380b3429d78367e3028bd5b53ca4e93f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 1 Apr 2019 23:52:41 +0200 Subject: Fix Docker Ubuntu cron (#2321) https://github.com/FreshRSS/FreshRSS/issues/2319 --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 56623b001..ea6917a40 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -25,7 +25,7 @@ RUN a2dismod -f alias autoindex negotiation status && \ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \ sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \ - echo "17,37 su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ + echo "17,37 su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ /var/spool/cron/crontabs/root ENV COPY_SYSLOG_TO_STDERR On -- cgit v1.2.3 From 0853cab2c46e2a38ce2f820a882dc0805be85ab8 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 00:07:33 +0200 Subject: i18n: Show categories unfolded by default (#2313) * i18n: Show categories unfolded by default Fix https://github.com/FreshRSS/FreshRSS/issues/2307 and https://github.com/FreshRSS/FreshRSS/issues/2309 * TODO checked * Update app/i18n/he/conf.php Co-Authored-By: Alkarex --- app/i18n/cz/conf.php | 2 +- app/i18n/de/conf.php | 2 +- app/i18n/fr/conf.php | 2 +- app/i18n/he/conf.php | 2 +- app/i18n/kr/conf.php | 2 +- app/i18n/oc/conf.php | 2 +- app/i18n/pt-br/conf.php | 2 +- app/i18n/zh-cn/conf.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php index d0203c252..a2618e310 100644 --- a/app/i18n/cz/conf.php +++ b/app/i18n/cz/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Po přečtení články schovat', 'confirm_enabled' => 'Vyžadovat potvrzení pro akci “označit vše jako přečtené”', 'display_articles_unfolded' => 'Ve výchozím stavu zobrazovat články otevřené', - 'display_categories_unfolded' => 'Ve výchozím stavu zobrazovat kategorie zavřené', + 'display_categories_unfolded' => 'Ve výchozím stavu zobrazovat kategorie otevřené', 'hide_read_feeds' => 'Schovat kategorie a kanály s nulovým počtem nepřečtených článků (nefunguje s nastavením “Zobrazit všechny články”)', 'img_with_lazyload' => 'Použít "lazy load" mód pro načítaní obrázků', 'jump_next' => 'skočit na další nepřečtený (kanál nebo kategorii)', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index e0beb1ac7..40209576e 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Artikel nach dem Lesen verstecken', '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', + 'display_categories_unfolded' => 'Kategorien standardmäßig ausgeklappt zeigen', 'hide_read_feeds' => 'Kategorien & Feeds ohne ungelesene Artikel verstecken (funktioniert nicht mit der Einstellung „Alle Artikel zeigen“)', 'img_with_lazyload' => 'Verwende die "träges Laden"-Methode zum Laden von Bildern', 'jump_next' => 'springe zum nächsten ungelesenen Geschwisterelement (Feed oder Kategorie)', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index d0d146c89..ef29a360e 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Cacher les articles après lecture', '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', + 'display_categories_unfolded' => 'Afficher les catégories dépliées par défaut', 'hide_read_feeds' => 'Cacher les catégories & flux sans article non-lu (ne fonctionne pas avec la configuration “Afficher tous les articles”)', 'img_with_lazyload' => 'Utiliser le mode “chargement différé” pour les images', 'jump_next' => 'sauter au prochain voisin non lu (flux ou catégorie)', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 2f699bcf2..1eb447911 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Hide articles after reading', //TODO - Translation 'confirm_enabled' => 'הצגת דו-שיח לאישור “סימון הכל כנקרא” ', 'display_articles_unfolded' => 'הצגת מאמרים בשלמותם כברירת מחדל', - 'display_categories_unfolded' => 'הצגת קטגוריות מקופלות כברירת מחדל', + 'display_categories_unfolded' => 'הצגת קטגוריות בשלמותן כברירת מחדל', 'hide_read_feeds' => 'הסתרת קטגוריות & הזנות ללא מאמרים שלא נקראו (לא עובד יחד עם “הצגת כל המאמרים”)', 'img_with_lazyload' => 'שימוש ב "טעינה עצלה" על מנת לטעון תמונות', 'jump_next' => 'קפיצה לפריט הבא שלא נקרא (הזנה או קטגוריה)', diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index 11a8494c5..644708d75 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => '글을 읽은 후 숨기기', 'confirm_enabled' => '“모두 읽음으로 표시” 실행시 확인 창 표시', 'display_articles_unfolded' => '글을 펼쳐진 상태로 보여주기', - 'display_categories_unfolded' => '카테고리를 접힌 상태로 보여주기', + 'display_categories_unfolded' => '카테고리를 접힌 상태로 보여주기', //TODO 'hide_read_feeds' => '읽지 않은 글이 없는 카테고리와 피드 감추기 (“모든 글 표시”가 설정된 경우 동작하지 않습니다)', 'img_with_lazyload' => '그림을 불러오는 데에 "lazy load" 모드 사용하기', 'jump_next' => '다음 읽지 않은 항목으로 이동 (피드 또는 카테고리)', diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index ad52691da..3ac573ca7 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Rescondre los articles aprèp lectura', 'confirm_enabled' => 'Mostrar una confirmacion per las accions del tipe « o marcar tot coma legit »', 'display_articles_unfolded' => 'Mostrar los articles desplegats per defaut', - 'display_categories_unfolded' => 'Mostrar las categorias plegadas per defaut', + 'display_categories_unfolded' => 'Mostrar las categorias desplegats per defaut', 'hide_read_feeds' => 'Rescondre las categorias & fluxes sens articles pas legits (fonciona pas amb la configuracion « Mostrar totes los articles »)', 'img_with_lazyload' => 'Utilizar lo mòde “cargament tardiu” pels imatges', 'jump_next' => 'sautar al vesin venent pas legit (flux o categoria)', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index ca365db5b..8f5eb7746 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => 'Esconder artigos depois de lidos', 'confirm_enabled' => 'Exibir uma caixa de diálogo de confirmação quando acionar "marcar todos como lido"', 'display_articles_unfolded' => 'Mostrar aritogs abertos por padrão', - 'display_categories_unfolded' => 'Mostrar artigos fechados por padrão', + 'display_categories_unfolded' => 'Mostrar artigos abertos por padrão', 'hide_read_feeds' => 'Esconder categorias e feeds com nenhum artigo não lido (não funciona com a configuração "Mostrar todos os artigos”)', 'img_with_lazyload' => 'Utilizar o modo "lazy load" para carregar as imagens', 'jump_next' => 'Vá para o próximo irmão não lido (feed ou categoria)', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 535dfd358..7ec20c487 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => '阅读后隐藏文章', 'confirm_enabled' => '“全部设为已读”时显示确认对话框', 'display_articles_unfolded' => '默认展开文章', - 'display_categories_unfolded' => '默认展开分类', + 'display_categories_unfolded' => '默认展开分类', //TODO 'hide_read_feeds' => '隐藏没有未读文章的分类或 RSS 源 (启用“显示所有文章”时不生效))', 'img_with_lazyload' => '延迟加载图片', 'jump_next' => '跳转到下一未读项 (RSS 源或分类)', -- cgit v1.2.3 From d9e246ecf763eb592f8246d4e9431a80599248e3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 00:08:51 +0200 Subject: Shortcuts legacy (#2320) Fix https://github.com/FreshRSS/FreshRSS/issues/2316 --- app/Controllers/configureController.php | 24 +++++----------------- app/views/helpers/javascript_vars.phtml | 2 +- lib/lib_rss.php | 36 +++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 20 deletions(-) diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 9c3900f39..16dd82121 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -166,30 +166,16 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * tab and up. */ public function shortcutAction() { - $list_keys = array('a', 'b', 'backspace', 'c', 'd', 'delete', 'down', 'e', 'end', 'enter', - 'escape', 'f', 'g', 'h', 'home', 'i', 'insert', 'j', 'k', 'l', 'left', - 'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right', - 's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y', - 'z', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', - 'f10', 'f11', 'f12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'); - $this->view->list_keys = $list_keys; + $this->view->list_keys = SHORTCUT_KEYS; if (Minz_Request::isPost()) { - $shortcuts = Minz_Request::param('shortcuts'); - $shortcuts_ok = array(); - - foreach ($shortcuts as $key => $value) { - if (in_array($value, $list_keys)) { - $shortcuts_ok[$key] = $value; - } - } - - FreshRSS_Context::$user_conf->shortcuts = $shortcuts_ok; + FreshRSS_Context::$user_conf->shortcuts = validateShortcutList(Minz_Request::param('shortcuts')); FreshRSS_Context::$user_conf->save(); invalidateHttpCache(); - Minz_Request::good(_t('feedback.conf.shortcuts_updated'), - array('c' => 'configure', 'a' => 'shortcut')); + Minz_Request::good(_t('feedback.conf.shortcuts_updated'), array('c' => 'configure', 'a' => 'shortcut')); + } else { + FreshRSS_Context::$user_conf->shortcuts = validateShortcutList(FreshRSS_Context::$user_conf->shortcuts); } Minz_View::prependTitle(_t('conf.shortcut.title') . ' · '); diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index b62263ecf..52489c5c3 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -1,6 +1,6 @@ mark_when; -$s = FreshRSS_Context::$user_conf->shortcuts; +$s = validateShortcutList(FreshRSS_Context::$user_conf->shortcuts); echo htmlspecialchars(json_encode(array( 'context' => array( 'anonymous' => !FreshRSS_Auth::hasAccess(), diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 3e0033a61..00b38254a 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -544,3 +544,39 @@ function base64url_decode($data) { function _i($icon, $url_only = false) { return FreshRSS_Themes::icon($icon, $url_only); } + + +const SHORTCUT_KEYS = array( + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', + 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'Backspace', 'Delete', + 'End', 'Enter', 'Escape', 'Home', 'Insert', 'PageDown', 'PageUp', 'Space', 'Tab', + ); + +function validateShortcutList($shortcuts) { + $legacy = array( + 'down' => 'ArrowDown', 'left' => 'ArrowLeft', 'page_down' => 'PageDown', 'page_up' => 'PageUp', + 'right' => 'ArrowRight', 'up' => 'ArrowUp', + ); + $upper = null; + $shortcuts_ok = array(); + + foreach ($shortcuts as $key => $value) { + if (in_array($value, SHORTCUT_KEYS)) { + $shortcuts_ok[$key] = $value; + } elseif (isset($legacy[$value])) { + $shortcuts_ok[$key] = $legacy[$value]; + } else { //Case-insensitive search + if ($upper === null) { + $upper = array_map('strtoupper', SHORTCUT_KEYS); + } + $i = array_search(strtoupper($value), $upper); + if ($i !== false) { + $shortcuts_ok[$key] = SHORTCUT_KEYS[$i]; + } + } + } + return $shortcuts_ok; +} -- cgit v1.2.3 From c48e28baf62ce21529e219311de5d113743cde4e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 13:27:41 +0200 Subject: Fix Docker cron mistake (#2325) https://github.com/FreshRSS/FreshRSS/issues/2319 --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index ea6917a40..efd77c6a1 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -25,7 +25,7 @@ RUN a2dismod -f alias autoindex negotiation status && \ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \ sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \ - echo "17,37 su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ + echo "17,37 * * * * su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ /var/spool/cron/crontabs/root ENV COPY_SYSLOG_TO_STDERR On -- cgit v1.2.3 From 32dd2e3c33e0cb569b8e50a4cc203a73146e3f29 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 14:21:34 +0200 Subject: Docker better use of crontab (#2326) Misc. from https://github.com/FreshRSS/FreshRSS/pull/2325 https://github.com/FreshRSS/FreshRSS/issues/2319 --- Docker/Dockerfile | 4 ++-- Docker/Dockerfile-Alpine | 8 ++++---- Docker/README.md | 13 ++++++++++++- Docker/entrypoint.sh | 2 +- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index efd77c6a1..798561c93 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -25,8 +25,8 @@ RUN a2dismod -f alias autoindex negotiation status && \ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \ sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \ - echo "17,37 * * * * su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ - /var/spool/cron/crontabs/root + echo "17,47 * * * * su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | \ + crontab - ENV COPY_SYSLOG_TO_STDERR On ENV CRON_MIN '' diff --git a/Docker/Dockerfile-Alpine b/Docker/Dockerfile-Alpine index cd0f521a0..fcaec37da 100644 --- a/Docker/Dockerfile-Alpine +++ b/Docker/Dockerfile-Alpine @@ -16,14 +16,14 @@ COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \ /etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \ - sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \ + sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \ /etc/apache2/httpd.conf && \ - sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|setenvif).so$/s/^\s*#//" \ + sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|setenvif).so$/s/^\s*#//" \ /etc/apache2/httpd.conf && \ sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \ /etc/apache2/httpd.conf && \ - echo "17,37 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \ - /var/spool/cron/crontabs/root + echo "27,57 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | \ + crontab - ENV COPY_SYSLOG_TO_STDERR On ENV CRON_MIN '' diff --git a/Docker/README.md b/Docker/README.md index 3cfb05c69..9bf20c8c2 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -211,12 +211,23 @@ For advanced users. Offers good logging and monitoring with auto-restart on fail Watch out to use the same run parameters than in your main FreshRSS instance, for database, networking, and file system. See cron option 1 for customising the cron schedule. +#### For the Ubuntu image (default) ```sh sudo docker run -d --restart unless-stopped --log-opt max-size=10m \ -v freshrss-data:/var/www/FreshRSS/data \ - -e 'CRON_MIN=17,37' \ + -e 'CRON_MIN=17,47' \ --net freshrss-network \ --name freshrss_cron freshrss/freshrss \ + cron +``` + +#### For the Alpine image +```sh +sudo docker run -d --restart unless-stopped --log-opt max-size=10m \ + -v freshrss-data:/var/www/FreshRSS/data \ + -e 'CRON_MIN=27,57' \ + --net freshrss-network \ + --name freshrss_cron freshrss/freshrss:alpine \ crond -f -d 6 ``` diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index 528388073..9db5c8185 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -8,7 +8,7 @@ chmod -R g+r . && chmod -R g+w ./data/ find /etc/php*/ -name php.ini -exec sed -r -i "\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \; if [ -n "$CRON_MIN" ]; then - sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root + crontab -l | sed -r "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab - fi exec "$@" -- cgit v1.2.3 From d78366c0beb3074df081fa6210312d7dd1c1de16 Mon Sep 17 00:00:00 2001 From: Seokseong Jeon <6747391+gsongsong@users.noreply.github.com> Date: Tue, 2 Apr 2019 22:42:00 +0900 Subject: i18n: Align Korean translation with categories unfolded by default (#2327) See https://github.com/FreshRSS/FreshRSS/pull/2313. --- app/i18n/kr/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index 644708d75..acd4c40c1 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -92,7 +92,7 @@ return array( 'auto_remove_article' => '글을 읽은 후 숨기기', 'confirm_enabled' => '“모두 읽음으로 표시” 실행시 확인 창 표시', 'display_articles_unfolded' => '글을 펼쳐진 상태로 보여주기', - 'display_categories_unfolded' => '카테고리를 접힌 상태로 보여주기', //TODO + 'display_categories_unfolded' => '카테고리를 펼친 상태로 보여주기', 'hide_read_feeds' => '읽지 않은 글이 없는 카테고리와 피드 감추기 (“모든 글 표시”가 설정된 경우 동작하지 않습니다)', 'img_with_lazyload' => '그림을 불러오는 데에 "lazy load" 모드 사용하기', 'jump_next' => '다음 읽지 않은 항목으로 이동 (피드 또는 카테고리)', -- cgit v1.2.3 From 4599d171df48b16eb6f985291c47c97c1ae5dd01 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 21:47:57 +0200 Subject: Docker fix cron logs (#2329) Fix environment variable bug --- Docker/Dockerfile | 8 +++++--- Docker/Dockerfile-Alpine | 6 ++++-- Docker/entrypoint.sh | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 798561c93..661543724 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -11,7 +11,7 @@ RUN apt update && \ php-sqlite3 php-mysql php-pgsql && \ rm -rf /var/lib/apt/lists/ -RUN mkdir -p /var/www/FreshRSS /run/apache2/ /run/php/ +RUN mkdir -p /var/www/FreshRSS /run/apache2/ WORKDIR /var/www/FreshRSS COPY . /var/www/FreshRSS @@ -25,8 +25,10 @@ RUN a2dismod -f alias autoindex negotiation status && \ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \ sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \ - echo "17,47 * * * * su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | \ - crontab - + touch /var/www/FreshRSS/Docker/env.txt && \ + echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \ + su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \ + 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab - ENV COPY_SYSLOG_TO_STDERR On ENV CRON_MIN '' diff --git a/Docker/Dockerfile-Alpine b/Docker/Dockerfile-Alpine index fcaec37da..589d266e5 100644 --- a/Docker/Dockerfile-Alpine +++ b/Docker/Dockerfile-Alpine @@ -22,8 +22,10 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \ /etc/apache2/httpd.conf && \ sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \ /etc/apache2/httpd.conf && \ - echo "27,57 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | \ - crontab - + touch /var/www/FreshRSS/Docker/env.txt && \ + echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \ + su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \ + 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab - ENV COPY_SYSLOG_TO_STDERR On ENV CRON_MIN '' diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index 9db5c8185..b7a961569 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -8,6 +8,7 @@ chmod -R g+r . && chmod -R g+w ./data/ find /etc/php*/ -name php.ini -exec sed -r -i "\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \; if [ -n "$CRON_MIN" ]; then + (echo "export TZ=$TZ" ; echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR") > /var/www/FreshRSS/Docker/env.txt crontab -l | sed -r "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab - fi -- cgit v1.2.3 From 8599dc29a17da3bdb7fdb264cadc0944f44d9eaf Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 Apr 2019 22:46:56 +0200 Subject: Fix control click (#2330) https://github.com/FreshRSS/FreshRSS/issues/2310 --- p/scripts/main.js | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 04bf50c81..e8b5dbd4f 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -891,21 +891,28 @@ function init_stream(stream) { } }; - stream.onmouseup = function (ev) { // Mouseup enables us to catch middle click + stream.onmouseup = function (ev) { // Mouseup enables us to catch middle click, and control+click in IE/Edge + if (ev.altKey || ev.metaKey || ev.shiftKey) { + return; + } + let el = ev.target.closest('.item.title > a'); if (el) { - if (ev.ctrlKey) { - return; // CTRL+click, it will be manage by previous rule. - } - if (ev.which == 2) { - // If middle click, we want same behaviour as CTRL+click. - const evc = document.createEvent('click'); - evc.ctrlKey = true; - el.dispatchEvent(evc); - } else if (ev.which == 1) { - // Normal click, just toggle article. - el.parentElement.click(); + if (ev.which == 1) { + if (ev.ctrlKey) { //Control+click + if (context.auto_mark_site) { + mark_read(el.closest('.flux'), true); + } + } else { + el.parentElement.click(); //Normal click, just toggle article. + } + } else if (ev.which == 2 && !ev.ctrlKey) { //Simple middle click: same behaviour as CTRL+click + if (context.auto_mark_article) { + const new_active = el.closest('.flux'); + mark_read(new_active, true); + } } + return; } if (context.auto_mark_site) { -- cgit v1.2.3 From afd1a8784c2a83426388b39d32703fb82c223f76 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 3 Apr 2019 08:02:43 +0200 Subject: Update git command (#2331) I removed an unnecessary option and rewrote a short option to use the long option. I find it's easier to understand long options when you don't type them. --- app/Controllers/updateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 2be644c85..46157960d 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -32,7 +32,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $output = array(); $return = 1; try { - exec('git clean -f -d -f', $output, $return); + exec('git clean -d --force', $output, $return); if ($return == 0) { exec('git pull --ff-only', $output, $return); } else { -- cgit v1.2.3 From 461a88657cccb7c4d1a89194397a7dd5f4032c6d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 3 Apr 2019 08:39:09 +0200 Subject: Changelog 2307 - 2319 https://github.com/FreshRSS/FreshRSS/issues/2307 https://github.com/FreshRSS/FreshRSS/issues/2310 https://github.com/FreshRSS/FreshRSS/pull/2312 https://github.com/FreshRSS/FreshRSS/issues/2314 https://github.com/FreshRSS/FreshRSS/pull/2315 https://github.com/FreshRSS/FreshRSS/issues/2316 https://github.com/FreshRSS/FreshRSS/pull/2318 https://github.com/FreshRSS/FreshRSS/issues/2319 --- CHANGELOG.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22bbb753..eeba1eb06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,18 @@ # FreshRSS changelog -## 2019-0X-XX FreshRSS 1.14.1-dev +## 2019-04-XX FreshRSS 1.14.1-dev +* Bug fixing + * Fix *load more articles* when using ascending order [#2314](https://github.com/FreshRSS/FreshRSS/issues/2314) + * Fix cron in the Ubuntu flavour of the Docker image [#2319](https://github.com/FreshRSS/FreshRSS/issues/2319) + * Fix the use of arrow keyboard keys for shortcuts [#2316](https://github.com/FreshRSS/FreshRSS/issues/2316) + * Fix control+click or middle-click for opening articles in a background tab [#2310](https://github.com/FreshRSS/FreshRSS/issues/2310) + * Fix the naming of the option to unfold categories [#2307](https://github.com/FreshRSS/FreshRSS/issues/2307) +* I18n + * Improve Dutch [#2312](https://github.com/FreshRSS/FreshRSS/pull/2312) +* Misc. + * Check JavaScript (jshint) in Travis continuous integration [#2315](https://github.com/FreshRSS/FreshRSS/pull/2315) + * Add PHP 7.3 to Travis [#2317](https://github.com/FreshRSS/FreshRSS/pull/2317) ## 2019-03-31 FreshRSS 1.14.0 @@ -35,7 +46,7 @@ * API * Supported by [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) (client for Android using Fever API) * I18n - * Improved Korean [#2242](https://github.com/FreshRSS/FreshRSS/pull/2242) + * Improve Korean [#2242](https://github.com/FreshRSS/FreshRSS/pull/2242) * Improve Occitan [#2253](https://github.com/FreshRSS/FreshRSS/pull/2253) * Security * Reworked the CSRF token interaction with the session in some edge cases [#2290](https://github.com/FreshRSS/FreshRSS/pull/2290) -- cgit v1.2.3 From 0eea6d5ab5098d5203877a5beacfac2e1311c5f8 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 3 Apr 2019 17:38:17 +0200 Subject: Revert "Update git command (#2331)" This reverts commit afd1a8784c2a83426388b39d32703fb82c223f76. --- app/Controllers/updateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 46157960d..2be644c85 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -32,7 +32,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $output = array(); $return = 1; try { - exec('git clean -d --force', $output, $return); + exec('git clean -f -d -f', $output, $return); if ($return == 0) { exec('git pull --ff-only', $output, $return); } else { -- cgit v1.2.3 From 452419bf83b2b124bb05c58f48b459107595ce0a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 3 Apr 2019 23:08:46 +0200 Subject: Fix auto_remove_article (#2334) * Fix auto_remove_article https://github.com/FreshRSS/FreshRSS/issues/2323 * Second attempt * Third attempt --- p/scripts/main.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index e8b5dbd4f..192d0bdf3 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -590,23 +590,24 @@ function onScroll() { }); } if (context.auto_remove_article) { - let maxTop = box_to_follow.scrollTop, - scrollOffset = 0; - document.querySelectorAll('.flux:not(.active):not(.keep_unread)').forEach(function (div) { + let scrollTop = box_to_follow.scrollTop; + let dirty = false; + document.querySelectorAll('.flux:not(.active):not(.not_read)').forEach(function (div) { if (!pending_entries[div.id] && div.offsetHeight > 0 && - div.offsetParent.offsetTop + div.offsetTop + div.offsetHeight < maxTop) { + div.offsetParent.offsetTop + div.offsetTop + (div.offsetHeight * 2) < scrollTop) { const p = div.previousElementSibling, n = div.nextElementSibling; if (p && p.classList.contains('day') && n && n.classList.contains('day')) { + scrollTop -= p.offsetHeight; p.remove(); } - maxTop -= div.offsetHeight; - scrollOffset -= div.offsetHeight; + scrollTop -= div.offsetHeight; div.remove(); + dirty = true; } }); - if (scrollOffset != 0) { - box_to_follow.scrollTop += scrollOffset; + if (dirty) { + box_to_follow.scrollTop = scrollTop; return; //onscroll will be called again } } -- cgit v1.2.3 From 2efab9893cd0e0e115edadbd21c1bbd6b771df5b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 3 Apr 2019 23:10:33 +0200 Subject: Fix shortcut problem when showing articles unfolded (#2336) Fix https://github.com/FreshRSS/FreshRSS/issues/2328 --- p/scripts/main.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 192d0bdf3..f22a9079b 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -365,13 +365,12 @@ function toggleContent(new_active, old_active, skipping) { const relative_move = context.current_view === 'global', box_to_move = relative_move ? document.getElementById('panel') : document.documentElement; - if (context.sticky_post) { + if (context.sticky_post) { //Stick the article to the top when opened let prev_article = new_active.previousElementSibling, - new_pos = new_active.offsetTop + document.documentElement.scrollTop, - old_scroll = box_to_move.scrollTop; + new_pos = new_active.offsetParent.offsetTop + new_active.offsetTop; if (prev_article && new_active.offsetTop - prev_article.offsetTop <= 150) { - new_pos = prev_article.offsetTop; + new_pos = prev_article.offsetParent.offsetTop + prev_article.offsetTop; if (relative_move) { new_pos -= box_to_move.offsetTop; } @@ -382,7 +381,7 @@ function toggleContent(new_active, old_active, skipping) { new_pos -= document.body.clientHeight / 4; } if (relative_move) { - new_pos += old_scroll; + new_pos += box_to_move.scrollTop; } box_to_move.scrollTop = new_pos; } -- cgit v1.2.3 From e1bb23ee443820458a14967e873868c44b4c01fe Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 4 Apr 2019 00:02:23 +0200 Subject: Fix scroll functions in Edge (#2337) Use more standard / robust document.scrollingElement --- p/scripts/main.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index f22a9079b..62b965d18 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -2,6 +2,7 @@ /* jshint esversion:6, strict:global */ // +if (!document.scrollingElement) document.scrollingElement = document.documentElement; if (!NodeList.prototype.forEach) NodeList.prototype.forEach = Array.prototype.forEach; if (!Element.prototype.matches) Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.webkitMatchesSelector; if (!Element.prototype.closest) Element.prototype.closest = function (s) { @@ -51,11 +52,11 @@ function badAjax() { } function needsScroll(elem) { - const winBottom = document.documentElement.scrollTop + document.documentElement.clientHeight, + const winBottom = document.scrollingElement.scrollTop + document.scrollingElement.clientHeight, elemTop = elem.offsetParent.offsetTop + elem.offsetTop, elemBottom = elemTop + elem.offsetHeight; - return (elemTop < document.documentElement.scrollTop || elemBottom > winBottom) ? - elemTop - (document.documentElement.clientHeight / 2) : 0; + return (elemTop < document.scrollingElement.scrollTop || elemBottom > winBottom) ? + elemTop - (document.scrollingElement.clientHeight / 2) : 0; } function str2int(str) { @@ -363,7 +364,7 @@ function toggleContent(new_active, old_active, skipping) { } const relative_move = context.current_view === 'global', - box_to_move = relative_move ? document.getElementById('panel') : document.documentElement; + box_to_move = relative_move ? document.getElementById('panel') : document.scrollingElement; if (context.sticky_post) { //Stick the article to the top when opened let prev_article = new_active.previousElementSibling, @@ -528,7 +529,7 @@ function user_filter(key) { // Force scrolling to the filter div const scroll = needsScroll(document.querySelector('.header')); if (scroll !== 0) { - document.documentElement.scrollTop = scroll; + document.scrollingElement.scrollTop = scroll; } // Force the key value if there is only one action, so we can trigger it automatically if (filters.length === 1) { @@ -556,7 +557,7 @@ function auto_share(key) { // Force scrolling to the share div const scrollTop = needsScroll(share.closest('.bottom')); if (scrollTop !== 0) { - document.documentElement.scrollTop = scrollTop; + document.scrollingElement.scrollTop = scrollTop; } // Force the key value if there is only one action, so we can trigger it automatically if (shares.length === 1) { @@ -621,10 +622,10 @@ function onScroll() { function init_posts() { if (context.auto_load_more || context.auto_mark_scroll || context.auto_remove_article) { - box_to_follow = context.current_view === 'global' ? document.getElementById('panel') : document.documentElement; + box_to_follow = context.current_view === 'global' ? document.getElementById('panel') : document.scrollingElement; let lastScroll = 0, //Throttle timerId = 0; - (box_to_follow === document.documentElement ? window : box_to_follow).onscroll = function () { + (box_to_follow === document.scrollingElement ? window : box_to_follow).onscroll = function () { clearTimeout(timerId); if (lastScroll + 500 < Date.now()) { lastScroll = Date.now(); @@ -987,10 +988,10 @@ function init_nav_entries() { }; nav_entries.querySelector('.up').onclick = function (e) { const active_item = document.querySelector('.flux.current'), - windowTop = document.documentElement.scrollTop, + windowTop = document.scrollingElement.scrollTop, item_top = active_item.offsetParent.offsetTop + active_item.offsetTop; - document.documentElement.scrollTop = windowTop > item_top ? item_top : 0; + document.scrollingElement.scrollTop = windowTop > item_top ? item_top : 0; return false; }; } -- cgit v1.2.3 From 375a1c826799fe87d98bb0577a8cd67b0a11400a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 4 Apr 2019 00:11:31 +0200 Subject: Changelog 2323 - 2337 https://github.com/FreshRSS/FreshRSS/issues/2323 https://github.com/FreshRSS/FreshRSS/issues/2328 https://github.com/FreshRSS/FreshRSS/pull/2334 https://github.com/FreshRSS/FreshRSS/pull/2336 https://github.com/FreshRSS/FreshRSS/pull/2337 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeba1eb06..119e124db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ * Fix the use of arrow keyboard keys for shortcuts [#2316](https://github.com/FreshRSS/FreshRSS/issues/2316) * Fix control+click or middle-click for opening articles in a background tab [#2310](https://github.com/FreshRSS/FreshRSS/issues/2310) * Fix the naming of the option to unfold categories [#2307](https://github.com/FreshRSS/FreshRSS/issues/2307) + * Fix shortcut problem when using unfolded articles [#2328](https://github.com/FreshRSS/FreshRSS/issues/2328) + * Fix auto-hidding articles [#2323](https://github.com/FreshRSS/FreshRSS/issues/2323) + * Fix scroll functions with Edge [#2337](https://github.com/FreshRSS/FreshRSS/pull/2337) * I18n * Improve Dutch [#2312](https://github.com/FreshRSS/FreshRSS/pull/2312) * Misc. -- cgit v1.2.3 From 09a5b4493d94120f836b85db5b84c0db7309a4ca Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 09:24:22 +0200 Subject: Better handling of bad request and fast unload (#2346) * Better handling of bad request and fast unload Warnings for bad requests, confirmation before leaving a page with pending mark-as-read requests (not the others for now) * Fix callbacks --- p/scripts/main.js | 60 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 62b965d18..48d88d15b 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -45,9 +45,11 @@ var context; }()); // -function badAjax() { +function badAjax(reload) { openNotification(context.i18n.notif_request_failed, 'bad'); - location.reload(); + if (reload) { + setTimeout(function () { location.reload(); }, 2000); + } return true; } @@ -168,19 +170,19 @@ function send_mark_read_queue(queue, asRead, callback) { req.open('POST', '.?c=entry&a=read' + (asRead ? '' : '&is_read=0'), true); req.responseType = 'json'; req.onerror = function (e) { - openNotification(context.i18n.notif_request_failed, 'bad'); for (let i = queue.length - 1; i >= 0; i--) { delete pending_entries['flux_' + queue[i]]; } - if (this.status == 403) { - badAjax(); - } + badAjax(this.status == 403); }; req.onload = function (e) { if (this.status != 200) { return req.onerror(e); } const json = xmlHttpRequestJson(this); + if (!json) { + return req.onerror(e); + } for (let i = queue.length - 1; i >= 0; i--) { const div = document.getElementById('flux_' + queue[i]), myIcons = context.icons; @@ -238,10 +240,11 @@ function send_mark_queue_tick(callback) { mark_read_queue = []; send_mark_read_queue(queue, true, callback); } +var delayedFunction = send_mark_queue_tick; function delayedClick(a) { if (a) { - send_mark_queue_tick(function () { a.click(); }); + delayedFunction(function () { a.click(); }); } } @@ -288,17 +291,17 @@ function mark_favorite(div) { req.open('POST', url, true); req.responseType = 'json'; req.onerror = function (e) { - openNotification(context.i18n.notif_request_failed, 'bad'); delete pending_entries[div.id]; - if (this.status == 403) { - badAjax(); - } + badAjax(this.status == 403); }; req.onload = function (e) { if (this.status != 200) { return req.onerror(e); } const json = xmlHttpRequestJson(this); + if (!json) { + return req.onerror(e); + } let inc = 0; if (div.classList.contains('favorite')) { div.classList.remove('favorite'); @@ -945,9 +948,7 @@ function init_stream(stream) { req.responseType = 'json'; req.onerror = function (e) { checkboxTag.checked = !isChecked; - if (this.status == 403) { - badAjax(); - } + badAjax(this.status == 403); }; req.onload = function (e) { if (this.status != 200) { @@ -1014,6 +1015,9 @@ function loadDynamicTags(div) { return req.onerror(e); } const json = xmlHttpRequestJson(this); + if (!json) { + return req.onerror(e); + } let html = '
  • '; if (json && json.length) { for (let i = 0; i < json.length; i++) { @@ -1039,7 +1043,7 @@ function updateFeed(feeds, feeds_count) { req.open('POST', feed.url, true); req.onloadend = function (e) { if (this.status != 200) { - return badAjax(); + return badAjax(false); } feed_processed++; const div = document.getElementById('actualizeProgress'); @@ -1050,7 +1054,7 @@ function updateFeed(feeds, feeds_count) { const req2 = new XMLHttpRequest(); req2.open('POST', './?c=feed&a=actualize&id=-1&ajax=1', true); req2.onloadend = function (e) { - location.reload(); + delayedFunction(function () { location.reload(); }); }; req2.setRequestHeader('Content-Type', 'application/json'); req2.send(JSON.stringify({ @@ -1082,9 +1086,12 @@ function init_actualize() { req.responseType = 'json'; req.onload = function (e) { if (this.status != 200) { - return badAjax(); + return badAjax(false); } const json = xmlHttpRequestJson(this); + if (!json) { + return badAjax(false); + } if (auto && json.feeds.length < 1) { auto = false; context.ajax_loading = false; @@ -1192,10 +1199,12 @@ function notifs_html5_show(nb) { }); notification.onclick = function () { - location.reload(); - window.focus(); - notification.close(); - }; + delayedFunction(function() { + location.reload(); + window.focus(); + notification.close(); + }); + }; if (context.html5_notif_timeout !== 0) { setTimeout(function () { @@ -1219,6 +1228,9 @@ function refreshUnreads() { req.responseType = 'json'; req.onload = function (e) { const json = xmlHttpRequestJson(this); + if (!json) { + return badAjax(false); + } const isAll = document.querySelector('.category.all.active'); let new_articles = false; @@ -1413,6 +1425,12 @@ function init_normal() { init_shortcuts(); init_actualize(); faviconNbUnread(); + + window.onbeforeunload = function (e) { + if (mark_read_queue && mark_read_queue.length > 0) { + return false; + } + }; } function init_beforeDOM() { -- cgit v1.2.3 From 74f92658b71e602d7fff3bbd249e3ea8869fa2ad Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 14:07:19 +0200 Subject: Fix for extensions on Windows (#2348) https://github.com/FreshRSS/FreshRSS/issues/994 https://github.com/FreshRSS/FreshRSS/issues/2287 --- p/ext.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/p/ext.php b/p/ext.php index 427bdc253..1b123f47d 100644 --- a/p/ext.php +++ b/p/ext.php @@ -20,6 +20,11 @@ require(__DIR__ . '/../constants.php'); function is_valid_path($path) { // It must be under the extension path. $real_ext_path = realpath(EXTENSIONS_PATH); + + //Windows compatibility + $real_ext_path = str_replace('\\', '/', $real_ext_path); + $path = str_replace('\\', '/', $path); + $in_ext_path = (substr($path, 0, strlen($real_ext_path)) === $real_ext_path); if (!$in_ext_path) { return false; -- cgit v1.2.3 From 0fb21e1473e36fcf265d09364d86e5af507faeba Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 15:51:00 +0200 Subject: SimplePie 604 (#2350) Cherry-pick https://github.com/simplepie/simplepie/pull/604 --- lib/SimplePie/SimplePie/Cache/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SimplePie/SimplePie/Cache/File.php b/lib/SimplePie/SimplePie/Cache/File.php index 6ba6c5f6e..a09dea637 100644 --- a/lib/SimplePie/SimplePie/Cache/File.php +++ b/lib/SimplePie/SimplePie/Cache/File.php @@ -101,7 +101,7 @@ class SimplePie_Cache_File implements SimplePie_Cache_Base */ public function save($data) { - if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location)) + if (file_exists($this->name) && is_writable($this->name) || file_exists($this->location) && is_writable($this->location)) { if ($data instanceof SimplePie) { -- cgit v1.2.3 From 0a067dbcd4f1c8958a1c7945fbbc8780b88c8d8a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 15:51:39 +0200 Subject: Fix hide articles + batch option (#2349) https://github.com/FreshRSS/FreshRSS/issues/2332 https://github.com/FreshRSS/FreshRSS/issues/2345 Re-introduces the instant-remove article. Batch mark-as-read only used for fast actions like scroll and keyboard shortcut for next/previous articles. --- p/scripts/main.js | 67 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 48d88d15b..286764d22 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -162,6 +162,26 @@ function incUnreadsTag(tag_id, nb) { } } +function removeArticle(div) { + let scrollTop = box_to_follow.scrollTop; + let dirty = false; + const p = div.previousElementSibling, + n = div.nextElementSibling; + if (p && p.classList.contains('day') && n && n.classList.contains('day')) { + scrollTop -= p.offsetHeight; + dirty = true; + p.remove(); + } + if (div.offsetHeight > 0 && div.offsetParent.offsetTop + div.offsetTop + div.offsetHeight < scrollTop) { + scrollTop -= div.offsetHeight; + dirty = true; + } + div.remove(); + if (dirty) { + box_to_follow.scrollTop = scrollTop; + } +} + var pending_entries = {}, mark_read_queue = []; @@ -194,6 +214,9 @@ function send_mark_read_queue(queue, asRead, callback) { }); div.querySelectorAll('a.read > .icon').forEach(function (img) { img.outerHTML = myIcons.read; }); inc--; + if (context.auto_remove_article) { + removeArticle(div); + } } else { div.classList.add('not_read'); div.classList.add('keep_unread'); //Split for IE11 @@ -248,7 +271,7 @@ function delayedClick(a) { } } -function mark_read(div, only_not_read) { +function mark_read(div, only_not_read, asBatch) { if (!div || !div.id || context.anonymous || (only_not_read && !div.classList.contains('not_read'))) { return false; @@ -260,7 +283,7 @@ function mark_read(div, only_not_read) { const asRead = div.classList.contains('not_read'), entryId = div.id.replace(/^flux_/, ''); - if (asRead) { + if (asRead && asBatch) { mark_read_queue.push(entryId); if (send_mark_read_queue_timeout == 0) { send_mark_read_queue_timeout = setTimeout(function () { send_mark_queue_tick(null); }, 1000); @@ -392,7 +415,7 @@ function toggleContent(new_active, old_active, skipping) { if (new_active.classList.contains('active') && !skipping) { if (context.auto_mark_article) { - mark_read(new_active, true); + mark_read(new_active, true, true); } new_active.dispatchEvent(freshrssOpenArticleEvent); } @@ -588,32 +611,10 @@ function onScroll() { document.querySelectorAll('.not_read:not(.keep_unread)').forEach(function (div) { if (div.offsetHeight > 0 && div.offsetParent.offsetTop + div.offsetTop + div.offsetHeight < minTop) { - mark_read(div, true); + mark_read(div, true, true); } }); } - if (context.auto_remove_article) { - let scrollTop = box_to_follow.scrollTop; - let dirty = false; - document.querySelectorAll('.flux:not(.active):not(.not_read)').forEach(function (div) { - if (!pending_entries[div.id] && div.offsetHeight > 0 && - div.offsetParent.offsetTop + div.offsetTop + (div.offsetHeight * 2) < scrollTop) { - const p = div.previousElementSibling, - n = div.nextElementSibling; - if (p && p.classList.contains('day') && n && n.classList.contains('day')) { - scrollTop -= p.offsetHeight; - p.remove(); - } - scrollTop -= div.offsetHeight; - div.remove(); - dirty = true; - } - }); - if (dirty) { - box_to_follow.scrollTop = scrollTop; - return; //onscroll will be called again - } - } if (context.auto_load_more) { const pagination = document.getElementById('mark-read-pagination'); if (pagination && box_to_follow.offsetHeight > 0 && @@ -749,7 +750,7 @@ function init_shortcuts() { } else if (ev.shiftKey) { // Mark everything as read document.querySelector('.nav_menu .read_all').click(); } else { // Toggle the read state - mark_read(document.querySelector('.flux.current'), false); + mark_read(document.querySelector('.flux.current'), false, false); } return false; } @@ -791,7 +792,7 @@ function init_shortcuts() { } if (k === s.go_website) { if (context.auto_mark_site) { - mark_read(document.querySelector('.flux.current'), true); + mark_read(document.querySelector('.flux.current'), true, false); } window.open(document.querySelector('.flux.current a.go_website').href); return false; @@ -817,7 +818,7 @@ function init_stream(stream) { stream.onclick = function (ev) { let el = ev.target.closest('.flux a.read'); if (el) { - mark_read(el.closest('.flux'), false); + mark_read(el.closest('.flux'), false, false); return false; } @@ -886,7 +887,7 @@ function init_stream(stream) { new_active = el.parentNode; if (ev.target.tagName.toUpperCase() === 'A') { //Leave real links alone if (context.auto_mark_article) { - mark_read(new_active, true); + mark_read(new_active, true, false); } return true; } @@ -905,7 +906,7 @@ function init_stream(stream) { if (ev.which == 1) { if (ev.ctrlKey) { //Control+click if (context.auto_mark_site) { - mark_read(el.closest('.flux'), true); + mark_read(el.closest('.flux'), true, false); } } else { el.parentElement.click(); //Normal click, just toggle article. @@ -913,7 +914,7 @@ function init_stream(stream) { } else if (ev.which == 2 && !ev.ctrlKey) { //Simple middle click: same behaviour as CTRL+click if (context.auto_mark_article) { const new_active = el.closest('.flux'); - mark_read(new_active, true); + mark_read(new_active, true, false); } } return; @@ -927,7 +928,7 @@ function init_stream(stream) { if (ev.which == 3) { return; } - mark_read(el.closest('.flux'), true); + mark_read(el.closest('.flux'), true, false); } } }; -- cgit v1.2.3 From 912480fab87f41bbfb7702ed269ebc5bcce6194f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 16:07:19 +0200 Subject: Ensure sanitizeHTML gets a string (#2351) Regression triggered by https://github.com/FreshRSS/FreshRSS/pull/2228 --- lib/lib_rss.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 00b38254a..fd1389047 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -280,6 +280,9 @@ function customSimplePie($attributes = array()) { } function sanitizeHTML($data, $base = '') { + if (!is_string($data)) { + return ''; + } static $simplePie = null; if ($simplePie == null) { $simplePie = customSimplePie(); -- cgit v1.2.3 From 43e3a2d69dc6343f3e30e7c3e3e1cb396a5650a1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 16:45:21 +0200 Subject: Fix autoremove again (#2352) Fix https://github.com/FreshRSS/FreshRSS/pull/2349 --- p/scripts/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/p/scripts/main.js b/p/scripts/main.js index 286764d22..a44a22c6a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -163,6 +163,9 @@ function incUnreadsTag(tag_id, nb) { } function removeArticle(div) { + if (!div || div.classList.contains('active') || div.classList.contains('not_read')) { + return; + } let scrollTop = box_to_follow.scrollTop; let dirty = false; const p = div.previousElementSibling, @@ -384,6 +387,9 @@ function toggleContent(new_active, old_active, skipping) { if (old_active) { old_active.classList.remove('active'); old_active.classList.remove('current'); //Split for IE11 + if (context.auto_remove_article) { + removeArticle(old_active); + } } } else { new_active.classList.toggle('active'); -- cgit v1.2.3 From 1b7cf6b0354c6b665d5a6ff8d3f6c4b52be6fbd6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 17:05:53 +0200 Subject: Fix menu warning (#2353) confirm is only for labels, not for feeds --- p/scripts/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index a44a22c6a..215d4117b 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -692,7 +692,10 @@ function init_column_categories() { a.href = '#dropdown-' + id; div.querySelector('.dropdown-target').id = 'dropdown-' + id; div.insertAdjacentHTML('beforeend', template); - div.querySelector('button.confirm').disabled = false; + const b = div.querySelector('button.confirm'); + if (b) { + b.disabled = false; + } } else if (getComputedStyle(dropdownMenu).display === 'none') { const id2 = div.closest('.item').id.substr(2); a.href = '#dropdown-' + id2; -- cgit v1.2.3 From dd397868564bf1d1dae6c16ab01cdfc0caf0e93a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 6 Apr 2019 17:43:17 +0200 Subject: Changelog https://github.com/FreshRSS/FreshRSS/issues/2323 https://github.com/FreshRSS/FreshRSS/pull/2353 https://github.com/FreshRSS/FreshRSS/issues/2332 https://github.com/FreshRSS/FreshRSS/pull/2337 https://github.com/FreshRSS/FreshRSS/issues/994 https://github.com/FreshRSS/FreshRSS/pull/2351 https://github.com/FreshRSS/FreshRSS/pull/2346 --- CHANGELOG.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 119e124db..619836d46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,26 @@ # FreshRSS changelog -## 2019-04-XX FreshRSS 1.14.1-dev +## 2019-04-0X FreshRSS 1.14.1-dev -* Bug fixing +* Bug fixing (regressions introduced in 1.14.0) * Fix *load more articles* when using ascending order [#2314](https://github.com/FreshRSS/FreshRSS/issues/2314) * Fix cron in the Ubuntu flavour of the Docker image [#2319](https://github.com/FreshRSS/FreshRSS/issues/2319) * Fix the use of arrow keyboard keys for shortcuts [#2316](https://github.com/FreshRSS/FreshRSS/issues/2316) * Fix control+click or middle-click for opening articles in a background tab [#2310](https://github.com/FreshRSS/FreshRSS/issues/2310) * Fix the naming of the option to unfold categories [#2307](https://github.com/FreshRSS/FreshRSS/issues/2307) * Fix shortcut problem when using unfolded articles [#2328](https://github.com/FreshRSS/FreshRSS/issues/2328) - * Fix auto-hidding articles [#2323](https://github.com/FreshRSS/FreshRSS/issues/2323) + * Fix auto-hiding articles [#2323](https://github.com/FreshRSS/FreshRSS/issues/2323) * Fix scroll functions with Edge [#2337](https://github.com/FreshRSS/FreshRSS/pull/2337) + * Fix drop-down menu warning [#2353](https://github.com/FreshRSS/FreshRSS/pull/2353) + * Fix delay for individual mark-as-read actions [#2332](https://github.com/FreshRSS/FreshRSS/issues/2332) + * Fix scroll functions in Edge [#2337](https://github.com/FreshRSS/FreshRSS/pull/2337) +* Bug fixing (misc.) + * Fix extensions in Windows [#994](https://github.com/FreshRSS/FreshRSS/issues/994) + * Fix import of empty articles [#2351](https://github.com/FreshRSS/FreshRSS/pull/2351) * I18n * Improve Dutch [#2312](https://github.com/FreshRSS/FreshRSS/pull/2312) * Misc. + * Better handling of bad HTTP request and fast page unload (ask confirmation) [#2346](https://github.com/FreshRSS/FreshRSS/pull/2346) * Check JavaScript (jshint) in Travis continuous integration [#2315](https://github.com/FreshRSS/FreshRSS/pull/2315) * Add PHP 7.3 to Travis [#2317](https://github.com/FreshRSS/FreshRSS/pull/2317) -- cgit v1.2.3 From aef3f8d71beae6dfd551617d03ec8fcdb53549e4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Apr 2019 00:29:37 +0200 Subject: Alow mix of auto read options (#2354) Fix https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126 --- p/scripts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 215d4117b..d85a3ae15 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -163,7 +163,7 @@ function incUnreadsTag(tag_id, nb) { } function removeArticle(div) { - if (!div || div.classList.contains('active') || div.classList.contains('not_read')) { + if (!div || div.classList.contains('not_read') || (context.auto_mark_article && div.classList.contains('active'))) { return; } let scrollTop = box_to_follow.scrollTop; -- cgit v1.2.3 From 8be28399efb5bcc779e687148613fe427593bfa4 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 7 Apr 2019 10:14:51 +0200 Subject: Fix quote escaping on CLI (#2355) for translation manipulations --- cli/i18n/I18nFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/i18n/I18nFile.php b/cli/i18n/I18nFile.php index bdcf3c079..56459ce8b 100644 --- a/cli/i18n/I18nFile.php +++ b/cli/i18n/I18nFile.php @@ -84,7 +84,7 @@ class I18nFile implements I18nFileInterface{ foreach ($translation as $compoundKey => $value) { $keys = explode('.', $compoundKey); array_shift($keys); - eval("\$a['" . implode("']['", $keys) . "'] = '" . $value . "';"); + eval("\$a['" . implode("']['", $keys) . "'] = '" . addcslashes($value, "'") . "';"); } return $a; -- cgit v1.2.3 From 49013bf7163935f32e0cbe75c71d4add1b48a43b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Apr 2019 14:01:05 +0200 Subject: Cherry pick from 2335 (#2356) Cherry pick bug fix from https://github.com/FreshRSS/FreshRSS/pull/2335 This code is currently not used. --- app/Models/EntryDAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 93d1183c9..b47cd55ad 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -350,7 +350,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql .= $hasWhere ? ' AND' : ' WHERE'; $hasWhere = true; $sql .= ' f.id=?'; - $values[] = $id; + $values[] = $feedId; } if ($catId !== false) { $sql .= $hasWhere ? ' AND' : ' WHERE'; -- cgit v1.2.3 From 3900fbb3015c72971527d5bb31f6cfd673835881 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Apr 2019 14:07:17 +0200 Subject: i18n zh unfolded categories (#2357) https://github.com/FreshRSS/FreshRSS/pull/2313 Thanks to @ZhongyuWang --- app/i18n/zh-cn/conf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 7ec20c487..216e4590a 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -91,8 +91,8 @@ return array( 'auto_load_more' => '在页面底部载入下一篇文章', 'auto_remove_article' => '阅读后隐藏文章', 'confirm_enabled' => '“全部设为已读”时显示确认对话框', - 'display_articles_unfolded' => '默认展开文章', - 'display_categories_unfolded' => '默认展开分类', //TODO + 'display_articles_unfolded' => '默认展开显示文章', + 'display_categories_unfolded' => '默认展开显示类别', 'hide_read_feeds' => '隐藏没有未读文章的分类或 RSS 源 (启用“显示所有文章”时不生效))', 'img_with_lazyload' => '延迟加载图片', 'jump_next' => '跳转到下一未读项 (RSS 源或分类)', -- cgit v1.2.3 From 0eb535e3ac9269d39d2ea7856c4c5532c3296a55 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Apr 2019 14:09:15 +0200 Subject: Release FreshRSS 1.14.1 --- CHANGELOG.md | 6 ++++-- constants.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 619836d46..d0b7a2f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # FreshRSS changelog -## 2019-04-0X FreshRSS 1.14.1-dev +## 2019-04-07 FreshRSS 1.14.1 * Bug fixing (regressions introduced in 1.14.0) * Fix *load more articles* when using ascending order [#2314](https://github.com/FreshRSS/FreshRSS/issues/2314) @@ -17,10 +17,12 @@ * Bug fixing (misc.) * Fix extensions in Windows [#994](https://github.com/FreshRSS/FreshRSS/issues/994) * Fix import of empty articles [#2351](https://github.com/FreshRSS/FreshRSS/pull/2351) + * Fix quote escaping on CLI i18n tools [#2355](https://github.com/FreshRSS/FreshRSS/pull/2355) +* UI + * Better handling of bad Ajax requests and fast page unload (ask confirmation) [#2346](https://github.com/FreshRSS/FreshRSS/pull/2346) * I18n * Improve Dutch [#2312](https://github.com/FreshRSS/FreshRSS/pull/2312) * Misc. - * Better handling of bad HTTP request and fast page unload (ask confirmation) [#2346](https://github.com/FreshRSS/FreshRSS/pull/2346) * Check JavaScript (jshint) in Travis continuous integration [#2315](https://github.com/FreshRSS/FreshRSS/pull/2315) * Add PHP 7.3 to Travis [#2317](https://github.com/FreshRSS/FreshRSS/pull/2317) diff --git a/constants.php b/constants.php index f8befdda0..ec833c4d1 100644 --- a/constants.php +++ b/constants.php @@ -2,7 +2,7 @@ //NB: Do not edit; use ./constants.local.php instead. // -define('FRESHRSS_VERSION', '1.14.1-dev'); +define('FRESHRSS_VERSION', '1.14.1'); define('FRESHRSS_WEBSITE', 'https://freshrss.org'); define('FRESHRSS_WIKI', 'https://freshrss.github.io/FreshRSS/'); -- cgit v1.2.3