From 8a131b056ee3566c2b54466f650c26c143b7c369 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 14 Jun 2015 16:22:33 +0200 Subject: Force autocomplete off https://github.com/FreshRSS/FreshRSS/issues/880 Put a space in the user field instead of empty to avoid autocomplete. Use feed ID in the username/password field name. --- app/Controllers/subscriptionController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 333565faf..03d3ee15e 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -77,11 +77,11 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { Minz_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $this->view->feed->name() . ' · '); if (Minz_Request::isPost()) { - $user = Minz_Request::param('http_user', ''); - $pass = Minz_Request::param('http_pass', ''); + $user = trim(Minz_Request::param('http_user_feed' . $id, '')); + $pass = Minz_Request::param('http_pass_feed' . $id, ''); $httpAuth = ''; - if ($user != '' || $pass != '') { + if ($user != '' && $pass != '') { //TODO: Sanitize $httpAuth = $user . ':' . $pass; } -- cgit v1.2.3 From 8a6b38115456f592c8a246f9abbb84f4449721c0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 25 Feb 2017 11:51:54 +0100 Subject: Sanitize Web site URL https://github.com/FreshRSS/FreshRSS/issues/1434 --- app/Controllers/subscriptionController.php | 4 ++-- lib/lib_rss.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 03d3ee15e..aa9f18663 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -90,8 +90,8 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $values = array( 'name' => Minz_Request::param('name', ''), 'description' => sanitizeHTML(Minz_Request::param('description', '', true)), - 'website' => Minz_Request::param('website', ''), - 'url' => Minz_Request::param('url', ''), + 'website' => checkUrl(Minz_Request::param('website', '')), + 'url' => checkUrl(Minz_Request::param('url', '')), 'category' => $cat, 'pathEntries' => Minz_Request::param('path_entries', ''), 'priority' => intval(Minz_Request::param('priority', 0)), diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 560e5b256..78c9cabea 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -69,10 +69,10 @@ function idn_to_puny($url) { } function checkUrl($url) { - if (empty ($url)) { + if ($url == '') { return ''; } - if (!preg_match ('#^https?://#i', $url)) { + if (!preg_match('#^https?://#i', $url)) { $url = 'http://' . $url; } $url = idn_to_puny($url); //PHP bug #53474 IDN -- cgit v1.2.3 From a52dc33353665be0d5f59231539c0143a35d55ec Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 4 Jun 2017 09:58:11 +0200 Subject: Add a subscription tools page See #1354 It's missing translations. Only English and French are available. Contributions wanted. --- app/Controllers/subscriptionController.php | 7 +++++++ app/i18n/cz/sub.php | 11 +++++++++++ app/i18n/de/sub.php | 11 +++++++++++ app/i18n/en/sub.php | 11 +++++++++++ app/i18n/fr/sub.php | 11 +++++++++++ app/i18n/it/sub.php | 11 +++++++++++ app/i18n/nl/sub.php | 11 +++++++++++ app/i18n/ru/sub.php | 11 +++++++++++ app/i18n/tr/sub.php | 11 +++++++++++ app/i18n/zh-cn/sub.php | 11 +++++++++++ app/layout/aside_subscription.phtml | 6 ++---- app/views/subscription/bookmarklet.phtml | 13 +++++++++++++ 12 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 app/views/subscription/bookmarklet.phtml (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index aa9f18663..6af048b84 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -113,4 +113,11 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { } } } + + /** + * This action displays the bookmarklet page. + */ + public function bookmarkletAction() { + Minz_View::prependTitle(_t('sub.title.subscription_tools') . ' . '); + } } diff --git a/app/i18n/cz/sub.php b/app/i18n/cz/sub.php index 274cf16e1..4fa790107 100644 --- a/app/i18n/cz/sub.php +++ b/app/i18n/cz/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Kategorie', 'add' => 'Přidat kategorii', @@ -39,6 +44,10 @@ return array( 'website' => 'URL webové stránky', 'pubsubhubbub' => 'Okamžité oznámení s PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Export', 'export_opml' => 'Exportovat seznam kanálů (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Přihlásit (FreshRSS bookmark)', 'import_export' => 'Import / export', 'subscription_management' => 'Správa subskripcí', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Správa subskripcí', 'feed_management' => 'Správa RSS kanálů', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php index cc98fd25c..aed931ab7 100644 --- a/app/i18n/de/sub.php +++ b/app/i18n/de/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Kategorie', 'add' => 'Eine Kategorie hinzufügen', @@ -39,6 +44,10 @@ return array( 'website' => 'Webseiten-URL', 'pubsubhubbub' => 'Sofortbenachrichtigung mit PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Exportieren', 'export_opml' => 'Liste der Feeds exportieren (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Abonnieren (FreshRSS-Lesezeichen)', 'import_export' => 'Importieren / Exportieren', 'subscription_management' => 'Abonnementverwaltung', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Abonnementverwaltung', 'feed_management' => 'Verwaltung der RSS-Feeds', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php index 86600e882..ca696280a 100644 --- a/app/i18n/en/sub.php +++ b/app/i18n/en/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Category', 'add' => 'Add a category', @@ -39,6 +44,10 @@ return array( 'website' => 'Website URL', 'pubsubhubbub' => 'Instant notification with PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Export', 'export_opml' => 'Export list of feeds (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Subscribe (FreshRSS bookmark)', 'import_export' => 'Import / export', 'subscription_management' => 'Subscriptions management', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Subscriptions management', 'feed_management' => 'RSS feeds management', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php index bb3f2fefc..db31259af 100644 --- a/app/i18n/fr/sub.php +++ b/app/i18n/fr/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Glisser ce bouton dans la barre des favoris ou cliquer droit dessus et choisir "Enregistrer ce lien". Ensuite, cliquer sur le bouton "S\'abonner" sur les pages auxquelles vous voulez vous abonner.', + 'label' => 'S\'abonner', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Catégorie', 'add' => 'Ajouter une catégorie', @@ -39,6 +44,10 @@ return array( 'website' => 'URL du site', 'pubsubhubbub' => 'Notification instantanée par PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Suivre les étapes décritent ici pour ajouter FreshRSS à la liste des lecteurs de flux dans Firefox.', + 'title' => 'Lecteur de flux dans Firefox', + ), 'import_export' => array( 'export' => 'Exporter', 'export_opml' => 'Exporter la liste des flux (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'S’abonner (bookmark FreshRSS)', 'import_export' => 'Importer / exporter', 'subscription_management' => 'Gestion des abonnements', + 'subscription_tools' => 'Outils d\'abonnement', ), 'title' => array( '_' => 'Gestion des abonnements', 'feed_management' => 'Gestion des flux RSS', + 'subscription_tools' => 'Outils d\'abonnement', ), ); diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php index 758e322c5..d1ae44e0f 100644 --- a/app/i18n/it/sub.php +++ b/app/i18n/it/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Categoria', 'add' => 'Aggiungi una categoria', @@ -39,6 +44,10 @@ return array( 'website' => 'URL del sito', 'pubsubhubbub' => 'Notifica istantanea con PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Esporta', 'export_opml' => 'Esporta tutta la lista dei feed (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Bookmark (trascina nei preferiti)', 'import_export' => 'Importa / esporta', 'subscription_management' => 'Gestione sottoscrizioni', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Gestione sottoscrizioni', 'feed_management' => 'Gestione RSS feeds', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php index e0cebbb4e..8af40e1a8 100644 --- a/app/i18n/nl/sub.php +++ b/app/i18n/nl/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Categorie', 'add' => 'Voeg categorie toe', @@ -39,6 +44,10 @@ return array( 'validator' => 'Controleer de geldigheid van de feed', 'website' => 'Website URL', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Exporteer', 'export_opml' => 'Exporteer lijst van feeds (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Abonneer (FreshRSS bladwijzer)', 'import_export' => 'Importeer / exporteer', 'subscription_management' => 'Abonnementenbeheer', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Abonnementenbeheer', 'feed_management' => 'RSS-feedbeheer', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php index 789433ee6..c6cf4e8b3 100644 --- a/app/i18n/ru/sub.php +++ b/app/i18n/ru/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Category', 'add' => 'Add a category', @@ -39,6 +44,10 @@ return array( 'website' => 'Website URL', 'pubsubhubbub' => 'Instant notification with PubSubHubbub', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Export', 'export_opml' => 'Export list of feeds (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Subscribe (FreshRSS bookmark)', 'import_export' => 'Import / export', 'subscription_management' => 'Subscriptions management', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Subscriptions management', 'feed_management' => 'RSS feeds management', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php index 7592096d9..ab9b6caa5 100644 --- a/app/i18n/tr/sub.php +++ b/app/i18n/tr/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => 'Kategori', 'add' => 'Kategori ekle', @@ -39,6 +44,10 @@ return array( 'website' => 'Site URL', 'pubsubhubbub' => 'PubSubHubbub ile anlık bildirim', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => 'Dışa aktar', 'export_opml' => 'Akış listesini dışarı aktar (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => 'Abonelik (FreshRSS yer imleri)', 'import_export' => 'İçe / dışa aktar', 'subscription_management' => 'Abonelik yönetimi', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => 'Abonelik yönetimi', 'feed_management' => 'RSS akış yönetimi', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php index 0c599e986..d30472f81 100644 --- a/app/i18n/zh-cn/sub.php +++ b/app/i18n/zh-cn/sub.php @@ -1,6 +1,11 @@ array( + 'documentation' => 'Drag this button to your bookmarks toolbar or right-click it and choose "Bookmark This Link". Then click "Subscribe" button in any page you want to subscribe to.', + 'label' => 'Subscribe', + 'title' => 'Bookmarklet', + ), 'category' => array( '_' => '分类', 'add' => '添加分类', @@ -39,6 +44,10 @@ return array( 'website' => '网站 URL', 'pubsubhubbub' => 'PubSubHubbub 即时通知', ), + 'firefox' => array( + 'documentation' => 'Follow the steps described here to add FreshRSS to Firefox feed reader list.', + 'title' => 'Firefox feed reader', + ), 'import_export' => array( 'export' => '导出', 'export_opml' => '导出 RSS 源列表 (OPML)', @@ -54,9 +63,11 @@ return array( 'bookmark' => '订阅 (FreshRSS 书签)', 'import_export' => '导入/导出', 'subscription_management' => '订阅管理', + 'subscription_tools' => 'Subscription tools', ), 'title' => array( '_' => '订阅管理', 'feed_management' => 'RSS 源管理', + 'subscription_tools' => 'Subscription tools', ), ); diff --git a/app/layout/aside_subscription.phtml b/app/layout/aside_subscription.phtml index e14afe2a7..6d2a5ac8f 100644 --- a/app/layout/aside_subscription.phtml +++ b/app/layout/aside_subscription.phtml @@ -9,9 +9,7 @@ -
  • - - - +
  • +
  • diff --git a/app/views/subscription/bookmarklet.phtml b/app/views/subscription/bookmarklet.phtml new file mode 100644 index 000000000..162501be6 --- /dev/null +++ b/app/views/subscription/bookmarklet.phtml @@ -0,0 +1,13 @@ +partial('aside_subscription'); ?> + +
    + + + +

    + + + +

    +
    browser.contentHandlers.types.number.uri →  'feed', 'a' => 'add'), 'html', true); ?>&url_rss=%s
    +
    \ No newline at end of file -- cgit v1.2.3