Merge branch 'master' of git://github.com/chrislemonier/miniflux into feed-title
This commit is contained in:
commit
c681854e6a
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,7 +29,7 @@
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store?
|
||||
.DS_Store
|
||||
ehthumbs.db
|
||||
Icon?
|
||||
Thumbs.db
|
||||
|
@ -96,11 +96,14 @@ Router\get_action('show-help', function() {
|
||||
Router\get_action('show', function() {
|
||||
|
||||
$id = Model\decode_item_id(Request\param('id'));
|
||||
$item = Model\get_item($id);
|
||||
$feed = Model\get_feed($item['feed_id']);
|
||||
|
||||
Model\set_item_read($id);
|
||||
|
||||
Response\html(Template\layout('show_item', array(
|
||||
'item' => Model\get_item($id),
|
||||
'item' => $item,
|
||||
'feed' => $feed,
|
||||
'menu' => 'show'
|
||||
)));
|
||||
});
|
||||
@ -111,12 +114,14 @@ Router\get_action('read', function() {
|
||||
|
||||
$id = Model\decode_item_id(Request\param('id'));
|
||||
$item = Model\get_item($id);
|
||||
$feed = Model\get_feed($item['feed_id']);
|
||||
$nav = Model\get_nav_item($item); // must be placed before set_item_read()
|
||||
|
||||
Model\set_item_read($id);
|
||||
|
||||
Response\html(Template\layout('show_item', array(
|
||||
'item' => $item,
|
||||
'feed' => $feed,
|
||||
'item_nav' => $nav,
|
||||
'menu' => 'read'
|
||||
)));
|
||||
|
@ -327,7 +327,7 @@ function get_unread_items($offset = null, $limit = null)
|
||||
{
|
||||
return \PicoTools\singleton('db')
|
||||
->table('items')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.content', 'items.bookmark', 'items.status', 'feeds.site_url')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.content', 'items.bookmark', 'items.status', 'feeds.site_url', 'feeds.title AS feed_title')
|
||||
->join('feeds', 'id', 'feed_id')
|
||||
->eq('status', 'unread')
|
||||
->desc('updated')
|
||||
@ -350,7 +350,7 @@ function get_read_items($offset = null, $limit = null)
|
||||
{
|
||||
return \PicoTools\singleton('db')
|
||||
->table('items')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.bookmark', 'feeds.site_url')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.bookmark', 'feeds.site_url', 'feeds.title AS feed_title')
|
||||
->join('feeds', 'id', 'feed_id')
|
||||
->eq('status', 'read')
|
||||
->desc('updated')
|
||||
@ -374,7 +374,7 @@ function get_bookmarks($offset = null, $limit = null)
|
||||
{
|
||||
return \PicoTools\singleton('db')
|
||||
->table('items')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.status', 'feeds.site_url')
|
||||
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.status', 'feeds.site_url', 'feeds.title AS feed_title')
|
||||
->join('feeds', 'id', 'feed_id')
|
||||
->in('status', array('read', 'unread'))
|
||||
->eq('bookmark', 1)
|
||||
@ -412,7 +412,7 @@ function get_feed_items($feed_id, $offset = null, $limit = null)
|
||||
|
||||
function get_item($id)
|
||||
{
|
||||
return \PicoTools\singleton('db')
|
||||
return \PicoTools\singleton('db')
|
||||
->table('items')
|
||||
->eq('id', $id)
|
||||
->findOne();
|
||||
|
@ -22,6 +22,7 @@
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
<?= Helper\escape($item['feed_title']) ?> |
|
||||
<?= Helper\get_host_from_url($item['url']) ?> |
|
||||
<?= dt('%e %B %Y %k:%M', $item['updated']) ?> |
|
||||
<a href="?action=bookmark&value=0&id=<?= $item_id ?>&redirect=bookmarks&offset=<?= $offset ?>"><?= t('remove bookmark') ?></a> |
|
||||
|
@ -24,6 +24,7 @@
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
<?= Helper\escape($item['feed_title']) ?> |
|
||||
<?= Helper\get_host_from_url($item['url']) ?> |
|
||||
|
||||
<span class="hide-mobile"><?= dt('%e %B %Y %k:%M', $item['updated']) ?> |</span>
|
||||
|
@ -12,6 +12,7 @@
|
||||
</h1>
|
||||
|
||||
<p class="infos">
|
||||
<?= Helper\escape($feed['title']) ?> |
|
||||
<?= Helper\get_host_from_url($item['url']) ?> |
|
||||
<span class="hide-mobile"><?= dt('%A %e %B %Y %k:%M', $item['updated']) ?> |</span>
|
||||
<?php if ($item['bookmark']): ?>
|
||||
|
@ -33,6 +33,7 @@
|
||||
<?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Helper\escape($item['feed_title']) ?> |
|
||||
<?= Helper\get_host_from_url($item['url']) ?> |
|
||||
<span class="hide-mobile"><?= dt('%e %B %Y %k:%M', $item['updated']) ?> |</span>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user