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