Fix some issues in PR
This commit is contained in:
parent
a2d2e95555
commit
3f972dafc2
@ -110,7 +110,7 @@ Router\get_action('feed-items', function() {
|
|||||||
$items = Model\Item\get_all_by_feed($feed_id, $offset, Model\Config\get('items_per_page'), $order, $direction);
|
$items = Model\Item\get_all_by_feed($feed_id, $offset, Model\Config\get('items_per_page'), $order, $direction);
|
||||||
|
|
||||||
Response\html(Template\layout('feed_items', array(
|
Response\html(Template\layout('feed_items', array(
|
||||||
'favicons' => Model\Feed\get_favicons(array($feed['id'])),
|
'favicons' => Model\Favicon\get_favicons(array($feed['id'])),
|
||||||
'original_marks_read' => Model\Config\get('original_marks_read'),
|
'original_marks_read' => Model\Config\get('original_marks_read'),
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'direction' => $direction,
|
'direction' => $direction,
|
||||||
|
@ -2,22 +2,11 @@
|
|||||||
|
|
||||||
namespace Model\Favicon;
|
namespace Model\Favicon;
|
||||||
|
|
||||||
use UnexpectedValueException;
|
|
||||||
use Model\Config;
|
use Model\Config;
|
||||||
use Model\Item;
|
|
||||||
use Model\Group;
|
use Model\Group;
|
||||||
use Helper;
|
use Helper;
|
||||||
use SimpleValidator\Validator;
|
|
||||||
use SimpleValidator\Validators;
|
|
||||||
use PicoDb\Database;
|
use PicoDb\Database;
|
||||||
use PicoFeed\Serialization\Export;
|
|
||||||
use PicoFeed\Serialization\Import;
|
|
||||||
use PicoFeed\Reader\Reader;
|
|
||||||
use PicoFeed\Reader\Favicon;
|
use PicoFeed\Reader\Favicon;
|
||||||
use PicoFeed\PicoFeedException;
|
|
||||||
use PicoFeed\Client\InvalidUrlException;
|
|
||||||
|
|
||||||
const LIMIT_ALL = -1;
|
|
||||||
|
|
||||||
// Create a favicons
|
// Create a favicons
|
||||||
function create_feed_favicon($feed_id, $site_url, $icon_link) {
|
function create_feed_favicon($feed_id, $site_url, $icon_link) {
|
||||||
@ -60,7 +49,7 @@ function fetch($feed_id, $site_url, $icon_link)
|
|||||||
// Store the favicon (only if it does not exist yet)
|
// Store the favicon (only if it does not exist yet)
|
||||||
function store($type, $icon)
|
function store($type, $icon)
|
||||||
{
|
{
|
||||||
if ($icon == "") {
|
if ($icon === '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +109,7 @@ function purge_favicons()
|
|||||||
'favicons_feeds.feed_id'
|
'favicons_feeds.feed_id'
|
||||||
)
|
)
|
||||||
->join('favicons_feeds', 'favicon_id', 'id')
|
->join('favicons_feeds', 'favicon_id', 'id')
|
||||||
->isnull('favicons_feeds.feed_id')
|
->isNull('favicons_feeds.feed_id')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
foreach ($favicons as $favicon) {
|
foreach ($favicons as $favicon) {
|
||||||
@ -198,5 +187,3 @@ function get_all_favicons()
|
|||||||
|
|
||||||
return $map;
|
return $map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user