From af335ea96f547be6ee3b5465bfeb6a90a3ff2572 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:53:29 -0400 Subject: [PATCH 01/48] Add helper format_bytes() --- miniflux/vendor/PicoTools/Helper.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/miniflux/vendor/PicoTools/Helper.php b/miniflux/vendor/PicoTools/Helper.php index a22a27a..a7b4b57 100644 --- a/miniflux/vendor/PicoTools/Helper.php +++ b/miniflux/vendor/PicoTools/Helper.php @@ -49,6 +49,15 @@ function flash_error($html) } +function format_bytes($size, $precision = 2) +{ + $base = log($size) / log(1024); + $suffixes = array('', 'k', 'M', 'G', 'T'); + + return round(pow(1024, $base - floor($base)), $precision).$suffixes[floor($base)]; +} + + function get_host_from_url($url) { return escape(parse_url($url, PHP_URL_HOST)); From c2d4ab6801317a7bc4a145c58673831f17ef40d2 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:54:26 -0400 Subject: [PATCH 02/48] Add database section --- miniflux/templates/config.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/miniflux/templates/config.php b/miniflux/templates/config.php index 83c50a0..6d581a5 100644 --- a/miniflux/templates/config.php +++ b/miniflux/templates/config.php @@ -1,26 +1,32 @@ - +

- - Don't use the same password everywhere!
+

+ Don't use the same password everywhere!
+

My data

- -

Download the entire database (Gzip compressed Sqlite file).

\ No newline at end of file +
+ +
From 07e49fa4a79680d1b5b90b6d6d0fb24551a95e83 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:54:59 -0400 Subject: [PATCH 03/48] Change assets version --- miniflux/templates/app_header.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniflux/templates/app_header.php b/miniflux/templates/app_header.php index 2c03dec..65b7ca7 100644 --- a/miniflux/templates/app_header.php +++ b/miniflux/templates/app_header.php @@ -4,8 +4,8 @@ miniflux - - + +
From 151c35b9df27fb9ec173f46e8263d8800672f8f8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:55:35 -0400 Subject: [PATCH 04/48] Replace hardcoded database path by a function (for future usage) --- miniflux/common.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/miniflux/common.php b/miniflux/common.php index 605af0d..5b19fd7 100644 --- a/miniflux/common.php +++ b/miniflux/common.php @@ -9,11 +9,17 @@ require 'schema.php'; require 'model.php'; +function get_db_filename() +{ + return 'data/db.sqlite'; +} + + PicoTools\container('db', function() { $db = new PicoDb\Database(array( 'driver' => 'sqlite', - 'filename' => 'data/db.sqlite' + 'filename' => get_db_filename() )); if ($db->schema()->check(1)) { From 7b155c6ce29596ddb08a906b4e1892800e8cb471 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:56:20 -0400 Subject: [PATCH 05/48] Add function to get next and previous unread item --- miniflux/model.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/miniflux/model.php b/miniflux/model.php index c03a03a..9570218 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -157,6 +157,31 @@ function get_item($id) } +function get_nav_item($item) +{ + $next_item = \PicoTools\singleton('db') + ->table('items') + ->columns('items.id') + ->eq('status', 'unread') + ->lt('updated', $item['updated']) + ->desc('updated') + ->findOne(); + + $previous_item = \PicoTools\singleton('db') + ->table('items') + ->columns('items.id') + ->eq('status', 'unread') + ->gt('updated', $item['updated']) + ->asc('updated') + ->findOne(); + + return array( + 'next' => $next_item, + 'previous' => $previous_item + ); +} + + function set_item_read($id) { \PicoTools\singleton('db') From e08625ceec1515fcd4550465495c25096003defe Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 26 Mar 2013 21:57:12 -0400 Subject: [PATCH 06/48] Add item navigation --- miniflux/assets/css/app.css | 38 +++++++++++++++++++++++++++++++ miniflux/index.php | 24 +++++++++++++++++-- miniflux/templates/read_item.php | 32 ++++++++++++++++++++++++++ miniflux/templates/read_items.php | 2 +- 4 files changed, 93 insertions(+), 3 deletions(-) diff --git a/miniflux/assets/css/app.css b/miniflux/assets/css/app.css index 6f9848a..f9f3717 100644 --- a/miniflux/assets/css/app.css +++ b/miniflux/assets/css/app.css @@ -443,6 +443,44 @@ nav .active a { color: purple; } +.item nav span, +.item nav a, +.item nav a:visited { + color: #3366CC; +} + +.item nav { + border-top: 1px dotted #ddd; + padding-top: 8px; + margin-top: 50px; + width: 100%; +} + +.nav-left { + width: 30%; + display: block; + float: left; +} + +.nav-middle { + text-align: center; + float: left; + width: 40%; +} + +.nav-right { + text-align: right; + margin-left: 70%; + width: 30%; + display: block; +} + +/* other pages */ +section li { + margin-left: 20px; + list-style-type: square; +} + /* mobile design */ @media only screen and (max-width: 480px) { diff --git a/miniflux/index.php b/miniflux/index.php index d198445..88b0446 100644 --- a/miniflux/index.php +++ b/miniflux/index.php @@ -74,14 +74,26 @@ Router\post_action('login', function() { }); +Router\get_action('show', function() { + + $id = Request\param('id'); + + Response\html(Template\layout('read_item', array( + 'item' => Model\get_item($id) + ))); +}); + + Router\get_action('read', function() { $id = Request\param('id'); + $item = Model\get_item($id); Model\set_item_read($id); Response\html(Template\layout('read_item', array( - 'item' => Model\get_item($id) + 'item' => $item, + 'item_nav' => Model\get_nav_item($item) ))); }); @@ -221,10 +233,17 @@ Router\post_action('add', function() { }); +Router\get_action('optimize-db', function() { + + \PicoTools\singleton('db')->getConnection()->exec('VACUUM'); + Response\redirect('?action=config'); +}); + + Router\get_action('download-db', function() { Response\force_download('db.sqlite.gz'); - Response\binary(gzencode(file_get_contents('data/db.sqlite'))); + Response\binary(gzencode(file_get_contents(get_db_filename()))); }); @@ -264,6 +283,7 @@ Router\get_action('config', function() { Response\html(Template\layout('config', array( 'errors' => array(), 'values' => Model\get_config(), + 'db_size' => filesize(get_db_filename()), 'menu' => 'config' ))); }); diff --git a/miniflux/templates/read_item.php b/miniflux/templates/read_item.php index 170d2ee..99fbc1c 100644 --- a/miniflux/templates/read_item.php +++ b/miniflux/templates/read_item.php @@ -15,6 +15,38 @@

+ + + + \ No newline at end of file diff --git a/miniflux/templates/read_items.php b/miniflux/templates/read_items.php index 12accb3..922c1f6 100644 --- a/miniflux/templates/read_items.php +++ b/miniflux/templates/read_items.php @@ -14,7 +14,7 @@
-

+

| | From 8e59668b84363872bc6532f38d5932c8176aa803 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 1 Apr 2013 21:31:24 -0400 Subject: [PATCH 07/48] Remove useless & --- miniflux/templates/read_item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/miniflux/templates/read_item.php b/miniflux/templates/read_item.php index 99fbc1c..ee81d9f 100644 --- a/miniflux/templates/read_item.php +++ b/miniflux/templates/read_item.php @@ -28,11 +28,11 @@ - Unread items + Unread items - Unread items + Unread items - Unread items + Unread items Unread items From 93ce3e170a0ce9d5fd1c7a3ad9a663d9dcd40999 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 1 Apr 2013 21:31:54 -0400 Subject: [PATCH 08/48] Check for single quotes too --- miniflux/vendor/PicoFeed/Reader.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/miniflux/vendor/PicoFeed/Reader.php b/miniflux/vendor/PicoFeed/Reader.php index e82705f..874d69a 100644 --- a/miniflux/vendor/PicoFeed/Reader.php +++ b/miniflux/vendor/PicoFeed/Reader.php @@ -71,15 +71,18 @@ class Reader return new Atom($this->content); } - else if (strpos($first_tag, 'content); } - else if (strpos($first_tag, 'content); } - else if (strpos($first_tag, 'content); } From ad4a856f091df4d01b06f89a5827c2f97b8edc29 Mon Sep 17 00:00:00 2001 From: EauLand Date: Tue, 2 Apr 2013 21:16:48 +0300 Subject: [PATCH 09/48] Improve ergonomics - don't move focus link (remove padding and add border transparent [fff]) - separate title 'miniflux' on mobile version - The links in .page in a single line on mobile version --- miniflux/assets/css/app.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/miniflux/assets/css/app.css b/miniflux/assets/css/app.css index f9f3717..d22d775 100644 --- a/miniflux/assets/css/app.css +++ b/miniflux/assets/css/app.css @@ -24,13 +24,13 @@ body { a { color: #3366CC; + border: 1px solid #fff; } a:focus { outline: 0; color: red; text-decoration: none; - padding: 3px; border: 1px dotted #aaa; } @@ -498,6 +498,7 @@ section li { .logo { display: block; float: none; + border-bottom: 1px solid #ccc; } header { @@ -516,11 +517,19 @@ section li { display: block; line-height: 25px; } + + nav ul { + padding-top: 5px; + } .page { clear: both; padding-top: 20px; } + + .page li { + margin-left: 5px; + } .item { font-size: 0.8em; @@ -534,4 +543,4 @@ section li { font-size: 0.9em; padding: 0; } -} \ No newline at end of file +} From 94c1beb19e1e292e2ef6d0668e2c60c14b406dd8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 2 Apr 2013 22:49:14 -0400 Subject: [PATCH 10/48] Add keyboard shortcuts --- miniflux/assets/css/app.css | 11 ++ miniflux/assets/js/app.js | 211 +++++++++++++++++++++++++++- miniflux/common.php | 7 +- miniflux/index.php | 25 +++- miniflux/model.php | 49 +++++++ miniflux/templates/config.php | 22 +++ miniflux/templates/read_item.php | 8 +- miniflux/templates/read_items.php | 24 +++- miniflux/templates/unread_items.php | 26 +++- 9 files changed, 361 insertions(+), 22 deletions(-) diff --git a/miniflux/assets/css/app.css b/miniflux/assets/css/app.css index f9f3717..6c2354e 100644 --- a/miniflux/assets/css/app.css +++ b/miniflux/assets/css/app.css @@ -234,6 +234,12 @@ textarea.form-error { border-color: #bce8f1; } +.alert-normal { + color: #333; + background-color: #f0f0f0; + border-color: #ddd; +} + /* buttons */ .btn { @@ -389,6 +395,11 @@ nav .active a { font-family: Georgia, serif; } +.items #current-item { + border: 2px dashed #d14; + padding: 5px; +} + /* item */ .item { diff --git a/miniflux/assets/js/app.js b/miniflux/assets/js/app.js index 9250382..53a4bbd 100644 --- a/miniflux/assets/js/app.js +++ b/miniflux/assets/js/app.js @@ -5,18 +5,36 @@ var queue_length = 5; + function switch_status(item_id) + { + var request = new XMLHttpRequest(); + + request.onreadystatechange = function() { + + if (request.readyState === 4) { + + var response = JSON.parse(request.responseText); + + if (response.status == "read" || response.status == "unread") { + + find_next_item(); + remove_item(response.item_id); + } + } + } + + request.open("POST", "?action=status&id=" + item_id, true); + request.send(); + } + + function mark_as_read(item_id) { var request = new XMLHttpRequest(); request.onload = function() { - var article = document.getElementById("item-" + item_id); - - if (article) { - - article.style.display = "none"; - } + remove_item(item_id); }; request.open("POST", "?action=read&id=" + item_id, true); @@ -24,6 +42,15 @@ } + function mark_as_unread(item_id) + { + var request = new XMLHttpRequest(); + + request.open("POST", "?action=unread&id=" + item_id, true); + request.send(); + } + + function show_refresh_icon(feed_id) { var container = document.getElementById("loading-feed-" + feed_id); @@ -137,6 +164,157 @@ } + function remove_item(item_id) + { + var item = document.getElementById("item-" + item_id); + if (item) item.parentNode.removeChild(item); + } + + + function open_original_item() + { + var link = document.getElementById("original-item"); + + if (link) { + + mark_as_read(link.getAttribute("data-item-id")); + find_next_item(); + link.click(); + } + } + + + function open_item() + { + var link = document.getElementById("open-item"); + if (link) link.click(); + } + + + function open_next_item() + { + var link = document.getElementById("next-item"); + + if (link) { + + link.click(); + } + else if (is_listing()) { + + find_next_item(); + } + } + + + function open_previous_item() + { + var link = document.getElementById("previous-item"); + + if (link) { + + link.click(); + } + else if (is_listing()) { + + find_previous_item(); + } + } + + + function change_item_status() + { + var item = document.getElementById("current-item"); + if (item) switch_status(item.getAttribute("data-item-id")); + } + + + function set_links_item(item_id) + { + var link = document.getElementById("original-item"); + if (link) link.id = "original-" + link.getAttribute("data-item-id"); + + var link = document.getElementById("open-item"); + if (link) link.id = "open-" + link.getAttribute("data-item-id"); + + var link = document.getElementById("original-" + item_id); + if (link) link.id = "original-item"; + + var link = document.getElementById("open-" + item_id); + if (link) link.id = "open-item"; + } + + + function find_next_item() + { + var items = document.getElementsByTagName("article"); + + if (! document.getElementById("current-item")) { + + items[0].id = "current-item"; + set_links_item(items[0].getAttribute("data-item-id")); + } + else { + + for (var i = 0, ilen = items.length; i < ilen; i++) { + + if (items[i].id == "current-item") { + + items[i].id = "item-" + items[i].getAttribute("data-item-id"); + + if (i + 1 < ilen) { + + items[i + 1].id = "current-item"; + set_links_item(items[i + 1].getAttribute("data-item-id")); + } + + break; + } + } + } + } + + + function find_previous_item() + { + var items = document.getElementsByTagName("article"); + + if (! document.getElementById("current-item")) { + + items[items.length - 1].id = "current-item"; + set_links_item(items[items.length - 1].getAttribute("data-item-id")); + } + else { + + for (var i = items.length - 1; i >= 0; i--) { + + if (items[i].id == "current-item") { + + items[i].id = "item-" + items[i].getAttribute("data-item-id"); + + if (i - 1 >= 0) { + + items[i - 1].id = "current-item"; + set_links_item(items[i - 1].getAttribute("data-item-id")); + } + + break; + } + } + } + } + + + function is_listing() + { + if (document.getElementById("listing")) { + + return true; + } + + return false; + } + + document.onclick = function(e) { var action = e.target.getAttribute("data-action"); @@ -161,4 +339,25 @@ } }; + document.onkeypress = function(e) { + + switch (e.keyCode || e.which) { + case 112: + open_previous_item(); + break; + case 110: + open_next_item(); + break; + case 118: + open_original_item(); + break; + case 111: + open_item(); + break; + case 109: + change_item_status(); + break; + } + }; + })(); \ No newline at end of file diff --git a/miniflux/common.php b/miniflux/common.php index 5b19fd7..b862013 100644 --- a/miniflux/common.php +++ b/miniflux/common.php @@ -9,6 +9,11 @@ require 'schema.php'; require 'model.php'; +const DB_VERSION = 1; +const APP_VERSION = 'master'; + + +// For future use... function get_db_filename() { return 'data/db.sqlite'; @@ -22,7 +27,7 @@ PicoTools\container('db', function() { 'filename' => get_db_filename() )); - if ($db->schema()->check(1)) { + if ($db->schema()->check(DB_VERSION)) { return $db; } diff --git a/miniflux/index.php b/miniflux/index.php index 88b0446..bdaef1c 100644 --- a/miniflux/index.php +++ b/miniflux/index.php @@ -108,6 +108,27 @@ Router\post_action('read', function() { }); +Router\post_action('unread', function() { + + $id = Request\param('id'); + + Model\set_item_unread($id); + + Response\json(array('Ok')); +}); + + +Router\post_action('status', function() { + + $id = Request\param('id'); + + Response\json(array( + 'item_id' => urlencode($id), + 'status' => Model\switch_item_status($id) + )); +}); + + Router\get_action('history', function() { Response\html(Template\layout('read_items', array( @@ -171,9 +192,9 @@ Router\get_action('ajax-refresh-feed', function() { }); -Router\get_action('flush-unread', function() { +Router\get_action('mark-as-read', function() { - Model\flush_unread(); + Model\mark_as_read(); Response\redirect('?action=unread'); }); diff --git a/miniflux/model.php b/miniflux/model.php index 9570218..1c70e7e 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -191,6 +191,55 @@ function set_item_read($id) } +function set_item_unread($id) +{ + \PicoTools\singleton('db') + ->table('items') + ->eq('id', $id) + ->save(array('status' => 'unread')); +} + + +function switch_item_status($id) +{ + $item = \PicoTools\singleton('db') + ->table('items') + ->columns('status') + ->eq('id', $id) + ->findOne(); + + if ($item['status'] == 'unread') { + + \PicoTools\singleton('db') + ->table('items') + ->eq('id', $id) + ->save(array('status' => 'read')); + + return 'read'; + } + else { + + \PicoTools\singleton('db') + ->table('items') + ->eq('id', $id) + ->save(array('status' => 'unread')); + + return 'unread'; + } + + return ''; +} + + +function mark_as_read() +{ + \PicoTools\singleton('db') + ->table('items') + ->eq('status', 'unread') + ->save(array('status' => 'read')); +} + + function flush_unread() { \PicoTools\singleton('db') diff --git a/miniflux/templates/config.php b/miniflux/templates/config.php index 6d581a5..8f3c311 100644 --- a/miniflux/templates/config.php +++ b/miniflux/templates/config.php @@ -30,3 +30,25 @@

  • Download the entire database (Gzip compressed Sqlite file).
  • + +
    +

    Help

    +
    +
    +
    +

    Keyboard shortcuts

    +
      +
    • Previous item = p
    • +
    • Next item = n
    • +
    • Mark as read or unread = m
    • +
    • Open original link = v
    • +
    • Open item = o
    • +
    +
    +
    +

    About

    +
      +
    • Miniflux version:
    • +
    +
    +
    \ No newline at end of file diff --git a/miniflux/templates/read_item.php b/miniflux/templates/read_item.php index ee81d9f..823c566 100644 --- a/miniflux/templates/read_item.php +++ b/miniflux/templates/read_item.php @@ -4,9 +4,9 @@ -
    +

    - +

    @@ -20,7 +20,7 @@

    diff --git a/miniflux/templates/config.php b/miniflux/templates/config.php index 95c3687..048da99 100644 --- a/miniflux/templates/config.php +++ b/miniflux/templates/config.php @@ -1,51 +1,54 @@
    - +
    - +
    - +
    - Don't use the same password everywhere!
    + + +
    - +
    -

    More informations

    +

    -

    Database

    +

    -

    Keyboard shortcuts

    +

      -
    • Previous item = p
    • -
    • Next item = n
    • -
    • Mark as read or unread = m
    • -
    • Open original link = v
    • -
    • Open item = o
    • +
    • = p
    • +
    • = n
    • +
    • = m
    • +
    • = v
    • +
    • = o
    -

    About

    +

    \ No newline at end of file diff --git a/miniflux/templates/confirm_flush.php b/miniflux/templates/confirm_flush.php index 5a15913..44938cc 100644 --- a/miniflux/templates/confirm_flush.php +++ b/miniflux/templates/confirm_flush.php @@ -1,10 +1,10 @@ -

    Do you really want to remove these items from your history?

    +

    - Yes - or cancel + +
    \ No newline at end of file diff --git a/miniflux/templates/confirm_remove.php b/miniflux/templates/confirm_remove.php index 4c48a75..ec40551 100644 --- a/miniflux/templates/confirm_remove.php +++ b/miniflux/templates/confirm_remove.php @@ -1,10 +1,10 @@ -

    Do you really want to remove this subscription: ""?

    +

    - Yes - or cancel + +
    \ No newline at end of file diff --git a/miniflux/templates/feeds.php b/miniflux/templates/feeds.php index c39d961..156b354 100644 --- a/miniflux/templates/feeds.php +++ b/miniflux/templates/feeds.php @@ -1,21 +1,21 @@ -

    No subscription.

    +

    -

    Nothing to read, do you want to update your subscriptions?

    +

    update your subscriptions?') ?>

    @@ -26,10 +26,10 @@

    - | - feed link | - remove | - refresh + | + | + | +

    diff --git a/miniflux/templates/import.php b/miniflux/templates/import.php index a81baf3..eca99a7 100644 --- a/miniflux/templates/import.php +++ b/miniflux/templates/import.php @@ -1,16 +1,16 @@
    - +
    - +
    \ No newline at end of file diff --git a/miniflux/templates/login.php b/miniflux/templates/login.php index 66b8fed..e273c79 100644 --- a/miniflux/templates/login.php +++ b/miniflux/templates/login.php @@ -9,7 +9,7 @@ @@ -20,14 +20,14 @@
    - +
    - +
    - +
    diff --git a/miniflux/templates/read_item.php b/miniflux/templates/read_item.php index 823c566..6af5719 100644 --- a/miniflux/templates/read_item.php +++ b/miniflux/templates/read_item.php @@ -1,6 +1,6 @@ -

    Article not found.

    +

    @@ -11,7 +11,7 @@

    | - +

    @@ -20,29 +20,29 @@ diff --git a/miniflux/templates/read_items.php b/miniflux/templates/read_items.php index 1944e81..fdbb038 100644 --- a/miniflux/templates/read_items.php +++ b/miniflux/templates/read_items.php @@ -1,13 +1,13 @@ -

    No history.

    +

    @@ -24,8 +24,8 @@

    | - | - mark as unread | + | + | - direct link +

    diff --git a/miniflux/templates/unread_items.php b/miniflux/templates/unread_items.php index 1e9dc23..dc50a83 100644 --- a/miniflux/templates/unread_items.php +++ b/miniflux/templates/unread_items.php @@ -1,13 +1,13 @@ -

    Nothing to read.

    +

    @@ -27,7 +27,7 @@

    | - mark as read | + | - direct link +

    diff --git a/miniflux/vendor/PicoTools/Translator.php b/miniflux/vendor/PicoTools/Translator.php index 40bd653..832635c 100644 --- a/miniflux/vendor/PicoTools/Translator.php +++ b/miniflux/vendor/PicoTools/Translator.php @@ -19,7 +19,7 @@ namespace PicoTools\Translator { $args = \func_get_args(); \array_shift($args); - \array_unshift($args, get($identifier)); + \array_unshift($args, get($identifier, $identifier)); return \call_user_func_array( 'sprintf', @@ -61,6 +61,12 @@ namespace PicoTools\Translator { } + function datetime($format, $timestamp) + { + return strftime($format, $timestamp); + } + + function get($identifier, $default = '') { $locales = container(); @@ -78,6 +84,8 @@ namespace PicoTools\Translator { function load($language) { + setlocale(LC_TIME, $language); + $path = PATH.$language; $locales = array(); @@ -118,4 +126,10 @@ namespace { return call_user_func_array('\PicoTools\Translator\translate', func_get_args()); } + + + function dt() { + + return call_user_func_array('\PicoTools\Translator\datetime', func_get_args()); + } } \ No newline at end of file From 4f0dac1e3a592773531073142eaed556bb4e2deb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 12 Apr 2013 21:09:05 -0400 Subject: [PATCH 33/48] Update picoFeed --- miniflux/vendor/PicoFeed/Parsers/Atom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoFeed/Parsers/Atom.php b/miniflux/vendor/PicoFeed/Parsers/Atom.php index cf3f405..7478bd1 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Atom.php +++ b/miniflux/vendor/PicoFeed/Parsers/Atom.php @@ -72,7 +72,7 @@ class Atom extends Parser { foreach ($xml->link as $link) { - if ((string) $link['type'] === 'text/html') { + if ((string) $link['type'] === 'text/html' || (string) $link['type'] === 'application/xhtml+xml') { return (string) $link['href']; } From 2203972e6569ba1a009744f485473c69a694d83d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 12 Apr 2013 21:27:51 -0400 Subject: [PATCH 34/48] Reload locales after a save_config() --- miniflux/model.php | 2 ++ miniflux/vendor/PicoTools/Translator.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/miniflux/model.php b/miniflux/model.php index b633f66..e6b2fac 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -460,5 +460,7 @@ function save_config(array $values) $_SESSION['user']['language'] = $values['language']; unset($_COOKIE['language']); + \PicoTools\Translator\load($values['language']); + return \PicoTools\singleton('db')->table('config')->update($values); } diff --git a/miniflux/vendor/PicoTools/Translator.php b/miniflux/vendor/PicoTools/Translator.php index 832635c..e2ce27d 100644 --- a/miniflux/vendor/PicoTools/Translator.php +++ b/miniflux/vendor/PicoTools/Translator.php @@ -110,7 +110,7 @@ namespace PicoTools\Translator { { static $values = array(); - if ($locales) { + if ($locales !== null) { $values = $locales; } From 782b952920c0fa3c583510eeaa4cc2fa376e2962 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:40:21 -0400 Subject: [PATCH 35/48] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7806308..82b8973 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ update* +make-archive.sh From e2076e8571a9f3bb2c9b9370e37ac4c8f77ff1eb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:41:20 -0400 Subject: [PATCH 36/48] Add index on status column --- miniflux/common.php | 2 +- miniflux/schema.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/miniflux/common.php b/miniflux/common.php index 6216aeb..7c0e222 100644 --- a/miniflux/common.php +++ b/miniflux/common.php @@ -10,7 +10,7 @@ require 'schema.php'; require 'model.php'; -const DB_VERSION = 3; +const DB_VERSION = 4; const APP_VERSION = 'master'; const APP_USERAGENT = 'Miniflux - http://miniflux.net'; const HTTP_TIMEOUT = 5; diff --git a/miniflux/schema.php b/miniflux/schema.php index 74dd7c1..4007577 100644 --- a/miniflux/schema.php +++ b/miniflux/schema.php @@ -3,6 +3,12 @@ namespace Schema; +function version_4($pdo) +{ + $pdo->exec("CREATE INDEX idx_status ON items(status)"); +} + + function version_3($pdo) { $pdo->exec("ALTER TABLE config ADD COLUMN language TEXT DEFAULT 'en_US'"); From f3105b5dd83ef366ead457f6ec5298dd79fba2ff Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:42:12 -0400 Subject: [PATCH 37/48] Add touch icon on login page too --- miniflux/templates/login.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/miniflux/templates/login.php b/miniflux/templates/login.php index e273c79..2a7ea80 100644 --- a/miniflux/templates/login.php +++ b/miniflux/templates/login.php @@ -3,8 +3,14 @@ + + + + + + miniflux - + From 68bfc130b7cb72a3cfd6f565102413a91594dd59 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:42:39 -0400 Subject: [PATCH 38/48] Update of PicoTools --- miniflux/vendor/PicoTools/Chrono.php | 100 ----------- miniflux/vendor/PicoTools/Crypto.php | 36 ---- miniflux/vendor/PicoTools/Helper.php | 12 ++ miniflux/vendor/PicoTools/Pixtag.php | 243 --------------------------- 4 files changed, 12 insertions(+), 379 deletions(-) delete mode 100644 miniflux/vendor/PicoTools/Chrono.php delete mode 100644 miniflux/vendor/PicoTools/Crypto.php delete mode 100644 miniflux/vendor/PicoTools/Pixtag.php diff --git a/miniflux/vendor/PicoTools/Chrono.php b/miniflux/vendor/PicoTools/Chrono.php deleted file mode 100644 index 8a65505..0000000 --- a/miniflux/vendor/PicoTools/Chrono.php +++ /dev/null @@ -1,100 +0,0 @@ - microtime(true), - 'finish' => 0 - ); - } - - - /** - * Stop a chrono - * - * @access public - * @static - * @param string $name Chrono name - */ - public static function stop($name) - { - if (! isset(self::$chronos[$name])) { - - throw new \RuntimeException('Chrono not started!'); - } - - self::$chronos[$name]['finish'] = microtime(true); - } - - - /** - * Get a duration of a chrono - * - * @access public - * @static - * @return float - */ - public static function duration($name) - { - if (! isset(self::$chronos[$name])) { - - throw new \RuntimeException('Chrono not started!'); - } - - return self::$chronos[$name]['finish'] - self::$chronos[$name]['start']; - } - - - /** - * Show all durations - * - * @access public - * @static - */ - public static function show() - { - foreach (self::$chronos as $name => $values) { - - echo $name.' = '; - echo round($values['finish'] - $values['start'], 2).'s'; - echo PHP_EOL; - } - } -} \ No newline at end of file diff --git a/miniflux/vendor/PicoTools/Crypto.php b/miniflux/vendor/PicoTools/Crypto.php deleted file mode 100644 index aa48295..0000000 --- a/miniflux/vendor/PicoTools/Crypto.php +++ /dev/null @@ -1,36 +0,0 @@ -'; + $html .= error_list($errors, $name); + + return $html; +} + + function form_textarea($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '') { $class .= error_class($errors, $name); diff --git a/miniflux/vendor/PicoTools/Pixtag.php b/miniflux/vendor/PicoTools/Pixtag.php deleted file mode 100644 index a5e59d8..0000000 --- a/miniflux/vendor/PicoTools/Pixtag.php +++ /dev/null @@ -1,243 +0,0 @@ -filename = $filename; - } - - - /** - * Read metadata from the picture - * - * @access public - */ - public function read() - { - $c = new Command('exiv2 -PIEXkt '.$this->filename); - $c->execute(); - $this->parse($c->getStdout()); - } - - - /** - * Parse metadata bloc from exiv2 output command - * - * @access public - * @param string $data Raw command output of exiv2 - */ - public function parse($data) - { - $lines = explode("\n", trim($data)); - - foreach ($lines as $line) { - - $results = preg_split('/ /', $line, -1, PREG_SPLIT_OFFSET_CAPTURE); - - if (isset($results[0][0])) { - - $key = $results[0][0]; - $value = ''; - - for ($i = 1, $ilen = count($results); $i < $ilen; ++$i) { - - if ($results[$i][0] !== '') { - - $value = substr($line, $results[$i][1]); - break; - } - } - - if ($value === '(Binary value suppressed)') { - - $value = ''; - } - - $this->container[$key] = $value; - } - } - } - - - /** - * Write metadata to the picture - * This method erase all keys and then add them to the picture - * - * @access public - */ - public function write() - { - $commands = array(); - - foreach ($this->container as $key => $value) { - - $commands[] = sprintf('-M "del %s"', $key); - $commands[] = sprintf('-M "add %s %s"', $key, $value); - } - - $c = new Command(sprintf( - 'exiv2 %s %s', - implode(' ', $commands), - $this->filename - )); - - $c->execute(); - - if ($c->getReturnValue() !== 0) { - - throw new \RuntimeException('Unable to write metadata'); - } - } - - - /** - * Set a metadata - * - * @access public - * @param string $offset Key name, see exiv2 documentation for keys list - * @param string $value Key value - */ - public function offsetSet($offset, $value) - { - $this->container[$offset] = $value; - } - - - /** - * Check if a key exists - * - * @access public - * @param string $offset Key name, see exiv2 documentation for keys list - * @return boolean True if the key exists - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - - /** - * Remove a metadata - * - * @access public - * @param string $offset Key name, see exiv2 documentation for keys list - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - - /** - * Get a metadata - * - * @access public - * @param string $offset Key name, see exiv2 documentation for keys list - * @return string Key value - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - - /** - * Reset the position of the container - * - * @access public - */ - public function rewind() - { - reset($this->container); - } - - - /** - * Current - * - * @access public - * @return string Current value - */ - public function current() - { - return current($this->container); - } - - - /** - * Key - * - * @access public - * @return string Current key - */ - public function key() - { - return key($this->container); - } - - - /** - * Next - * - * @access public - */ - public function next() - { - next($this->container); - } - - - /** - * Valid - * - * @access public - * @return boolean True if the current key is valid - */ - public function valid() - { - return isset($this->container[key($this->container)]); - } -} \ No newline at end of file From 93d1fd40c0439bebc3f4afc6938f2e5a2467de2d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:43:18 -0400 Subject: [PATCH 39/48] Template rename --- miniflux/templates/{read_items.php => history.php} | 1 + 1 file changed, 1 insertion(+) rename miniflux/templates/{read_items.php => history.php} (93%) diff --git a/miniflux/templates/read_items.php b/miniflux/templates/history.php similarity index 93% rename from miniflux/templates/read_items.php rename to miniflux/templates/history.php index fdbb038..17db654 100644 --- a/miniflux/templates/read_items.php +++ b/miniflux/templates/history.php @@ -26,6 +26,7 @@ | | | + | Date: Mon, 22 Apr 2013 22:43:38 -0400 Subject: [PATCH 40/48] Update of picoDb --- miniflux/vendor/PicoDb/Table.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoDb/Table.php b/miniflux/vendor/PicoDb/Table.php index f543fd8..f05532b 100644 --- a/miniflux/vendor/PicoDb/Table.php +++ b/miniflux/vendor/PicoDb/Table.php @@ -63,7 +63,14 @@ class Table $this->conditions() ); - return false !== $this->db->execute($sql, $values); + $result = $this->db->execute($sql, $values); + + if ($result !== false && $result->rowCount() > 0) { + + return true; + } + + return false; } @@ -290,6 +297,17 @@ class Table } break; + case 'notin': + if (is_array($arguments[1])) { + + $sql = sprintf( + '%s NOT IN (%s)', + $this->db->escapeIdentifier($column), + implode(', ', array_fill(0, count($arguments[1]), '?')) + ); + } + break; + case 'like': $sql = sprintf('%s LIKE ?', $this->db->escapeIdentifier($column)); break; From 5a2869e2588ff218bbd7928638704e0d93d8279b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:44:28 -0400 Subject: [PATCH 41/48] Add remove link on history page and remove old items automatically --- miniflux/index.php | 10 ++++++++- miniflux/model.php | 52 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/miniflux/index.php b/miniflux/index.php index 893adb0..6168bb4 100644 --- a/miniflux/index.php +++ b/miniflux/index.php @@ -133,6 +133,14 @@ Router\get_action('mark-item-unread', function() { }); +Router\get_action('mark-item-removed', function() { + + $id = Request\param('id'); + Model\set_item_removed($id); + Response\Redirect('?action=history'); +}); + + Router\post_action('mark-item-read', function() { $id = Request\param('id'); @@ -162,7 +170,7 @@ Router\post_action('change-item-status', function() { Router\get_action('history', function() { - Response\html(Template\layout('read_items', array( + Response\html(Template\layout('history', array( 'items' => Model\get_read_items(), 'menu' => 'history' ))); diff --git a/miniflux/model.php b/miniflux/model.php index e6b2fac..33f5872 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -261,6 +261,15 @@ function get_nav_item($item) } +function set_item_removed($id) +{ + \PicoTools\singleton('db') + ->table('items') + ->eq('id', $id) + ->save(array('status' => 'removed')); +} + + function set_item_read($id) { \PicoTools\singleton('db') @@ -339,27 +348,48 @@ function flush_read() function update_items($feed_id, array $items) { + $items_in_feed = array(); $db = \PicoTools\singleton('db'); $db->startTransaction(); foreach ($items as $item) { - if ($item->id && ! $db->table('items')->eq('id', $item->id)->count()) { + // Item parsed correctly? + if ($item->id) { - $db->table('items')->save(array( - 'id' => $item->id, - 'title' => $item->title, - 'url' => $item->url, - 'updated' => $item->updated, - 'author' => $item->author, - 'content' => $item->content, - 'status' => 'unread', - 'feed_id' => $feed_id - )); + // Insert only new item + if ($db->table('items')->eq('id', $item->id)->count() !== 1) { + + $db->table('items')->save(array( + 'id' => $item->id, + 'title' => $item->title, + 'url' => $item->url, + 'updated' => $item->updated, + 'author' => $item->author, + 'content' => $item->content, + 'status' => 'unread', + 'feed_id' => $feed_id + )); + } + + // Items inside this feed + $items_in_feed[] = $item->id; } } + // Remove from the database items marked as "removed" + // and not present inside the feed + if (! empty($items_in_feed)) { + + \PicoTools\singleton('db') + ->table('items') + ->notin('id', $items_in_feed) + ->eq('status', 'removed') + ->eq('feed_id', $feed_id) + ->remove(); + } + $db->closeTransaction(); } From 4b91640cc1dae5c6ca412718f8a9a876da9a7e23 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 23 Apr 2013 21:41:04 -0400 Subject: [PATCH 42/48] Auto-vacuum when refresh feeds with the cronjob --- miniflux/model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miniflux/model.php b/miniflux/model.php index 33f5872..d14887e 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -114,6 +114,9 @@ function update_feeds() update_feed($feed_id); } + + // Auto-vacuum for people using the cronjob + \PicoTools\singleton('db')->getConnection()->exec('VACUUM'); } From 45e848b5b2bf2acbd41292189d399fe8980f5a6e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 24 Apr 2013 20:00:02 -0400 Subject: [PATCH 43/48] Improve CSS --- miniflux/assets/css/app.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/miniflux/assets/css/app.css b/miniflux/assets/css/app.css index a61064d..040a890 100644 --- a/miniflux/assets/css/app.css +++ b/miniflux/assets/css/app.css @@ -63,6 +63,12 @@ blockquote { font-family: Georgia, serif; } +q { + color: purple; + font-family: Georgia, serif; + font-style: italic; +} + blockquote + p { color: #555; font-style: italic; @@ -401,14 +407,17 @@ nav .active a { /* item */ .item { - color: #333; + padding-left: 5px; + padding-right: 5px; padding-bottom: 50px; + color: #555; } .item p, .item li { font-family: Georgia, serif; line-height: 1.6em; + font-size: 1.1em; } .item h2, From 1c29f54c8a669a127d9cab9d1aa8de4f2ddc76f5 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 24 Apr 2013 20:00:30 -0400 Subject: [PATCH 44/48] Add tag support for "q" --- miniflux/vendor/PicoFeed/Filter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoFeed/Filter.php b/miniflux/vendor/PicoFeed/Filter.php index 65206e4..f57d5e8 100644 --- a/miniflux/vendor/PicoFeed/Filter.php +++ b/miniflux/vendor/PicoFeed/Filter.php @@ -44,7 +44,8 @@ class Filter 'cite' => array(), 'time' => array('datetime'), 'abbr' => array('title'), - 'iframe' => array('width', 'height', 'frameborder', 'src') + 'iframe' => array('width', 'height', 'frameborder', 'src'), + 'q' => array('cite') ); public $strip_tags_content = array( From 855d78bb481c0008d8410eb8712801a981e4d2da Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 27 Apr 2013 08:44:30 -0400 Subject: [PATCH 45/48] Add utf-8 time locales --- miniflux/vendor/PicoTools/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoTools/Translator.php b/miniflux/vendor/PicoTools/Translator.php index e2ce27d..2e4dffb 100644 --- a/miniflux/vendor/PicoTools/Translator.php +++ b/miniflux/vendor/PicoTools/Translator.php @@ -84,7 +84,7 @@ namespace PicoTools\Translator { function load($language) { - setlocale(LC_TIME, $language); + setlocale(LC_TIME, $language.'.UTF-8'); $path = PATH.$language; $locales = array(); From 40f20a9bf53aeaed1e8698f3eef7cf8ee8e5ac54 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 30 Apr 2013 21:52:43 -0400 Subject: [PATCH 46/48] Fix bug #28: History original link disappear --- miniflux/assets/js/app.js | 10 +++++++--- miniflux/templates/app_header.php | 2 +- miniflux/templates/history.php | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/miniflux/assets/js/app.js b/miniflux/assets/js/app.js index 0f4ff86..3cca31c 100644 --- a/miniflux/assets/js/app.js +++ b/miniflux/assets/js/app.js @@ -11,7 +11,7 @@ request.onreadystatechange = function() { - if (request.readyState === 4) { + if (request.readyState === 4 && is_listing()) { var response = JSON.parse(request.responseText); @@ -180,8 +180,12 @@ if (link) { - mark_as_read(link.getAttribute("data-item-id")); - find_next_item(); + if (link.getAttribute("data-action") == "mark-read") { + + mark_as_read(link.getAttribute("data-item-id")); + find_next_item(); + } + link.click(); } } diff --git a/miniflux/templates/app_header.php b/miniflux/templates/app_header.php index 3cfbda1..2ccee69 100644 --- a/miniflux/templates/app_header.php +++ b/miniflux/templates/app_header.php @@ -2,7 +2,7 @@ - + diff --git a/miniflux/templates/history.php b/miniflux/templates/history.php index 17db654..41637b5 100644 --- a/miniflux/templates/history.php +++ b/miniflux/templates/history.php @@ -33,7 +33,6 @@ rel="noreferrer" target="_blank" data-item-id="" - data-action="mark-read" > From 00644bb2b8ed29b9949018861a4ab025b65b53b4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 30 Apr 2013 22:34:02 -0400 Subject: [PATCH 47/48] Bug fix #26: previous/next issue (items with same updated value) --- miniflux/index.php | 3 ++- miniflux/model.php | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/miniflux/index.php b/miniflux/index.php index 6168bb4..23f2fa3 100644 --- a/miniflux/index.php +++ b/miniflux/index.php @@ -107,12 +107,13 @@ Router\get_action('read', function() { $id = Request\param('id'); $item = Model\get_item($id); + $nav = Model\get_nav_item($item); // must be placed before set_item_read() Model\set_item_read($id); Response\html(Template\layout('read_item', array( 'item' => $item, - 'item_nav' => Model\get_nav_item($item) + 'item_nav' => $nav ))); }); diff --git a/miniflux/model.php b/miniflux/model.php index d14887e..2bcf339 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -241,21 +241,25 @@ function get_item($id) function get_nav_item($item) { - $next_item = \PicoTools\singleton('db') + $unread_items = \PicoTools\singleton('db') ->table('items') ->columns('items.id') ->eq('status', 'unread') - ->lt('updated', $item['updated']) ->desc('updated') - ->findOne(); + ->findAll(); - $previous_item = \PicoTools\singleton('db') - ->table('items') - ->columns('items.id') - ->eq('status', 'unread') - ->gt('updated', $item['updated']) - ->asc('updated') - ->findOne(); + $next_item = null; + $previous_item = null; + + for ($i = 0, $ilen = count($unread_items); $i < $ilen; $i++) { + + if ($unread_items[$i]['id'] == $item['id']) { + + if ($i > 0) $previous_item = $unread_items[$i - 1]; + if ($i < ($ilen - 1)) $next_item = $unread_items[$i + 1]; + break; + } + } return array( 'next' => $next_item, From 5ada718357fc4edf7f60f2a35bd040ad811ba310 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 May 2013 21:44:03 -0400 Subject: [PATCH 48/48] Blank titles are filled with the url --- miniflux/vendor/PicoFeed/Parsers/Atom.php | 2 ++ miniflux/vendor/PicoFeed/Parsers/Rss10.php | 3 ++- miniflux/vendor/PicoFeed/Parsers/Rss20.php | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoFeed/Parsers/Atom.php b/miniflux/vendor/PicoFeed/Parsers/Atom.php index 7478bd1..6e925d0 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Atom.php +++ b/miniflux/vendor/PicoFeed/Parsers/Atom.php @@ -39,6 +39,8 @@ class Atom extends Parser $item->author = $author; $item->content = $this->filterHtml($this->getContent($entry), $item->url); + if (empty($item->title)) $item->title = $item->url; + $this->items[] = $item; } diff --git a/miniflux/vendor/PicoFeed/Parsers/Rss10.php b/miniflux/vendor/PicoFeed/Parsers/Rss10.php index 000119c..d04bdd5 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Rss10.php +++ b/miniflux/vendor/PicoFeed/Parsers/Rss10.php @@ -9,7 +9,6 @@ class Rss10 extends Parser $this->content = $this->normalizeData($this->content); \libxml_use_internal_errors(true); - $xml = \simplexml_load_string($this->content); if ($xml === false) { @@ -74,6 +73,8 @@ class Rss10 extends Parser } } + if (empty($item->title)) $item->title = $item->url; + $item->id = $item->url; $item->content = $this->filterHtml($item->content, $item->url); $this->items[] = $item; diff --git a/miniflux/vendor/PicoFeed/Parsers/Rss20.php b/miniflux/vendor/PicoFeed/Parsers/Rss20.php index bc04d84..919b968 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Rss20.php +++ b/miniflux/vendor/PicoFeed/Parsers/Rss20.php @@ -91,6 +91,8 @@ class Rss20 extends Parser $item->id = $item->url; } + if (empty($item->title)) $item->title = $item->url; + $item->content = $this->filterHtml($item->content, $item->url); $this->items[] = $item; }