feature 583: notification infromation can be filtered by the requester
(optionnally no comments/new users...) small lang correction in header.tpl git-svn-id: http://piwigo.org/svn/trunk@1636 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
af138fa631
commit
f880be0609
7 changed files with 45 additions and 27 deletions
52
feed.php
52
feed.php
|
|
@ -144,29 +144,42 @@ $rss->link = $conf['gallery_url'];
|
|||
// | Feed creation |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$news = news($user['last_check'], $dbnow, true, true);
|
||||
|
||||
if (count($news) > 0)
|
||||
if ( !isset($_GET['image_only']) )
|
||||
{
|
||||
$item = new FeedItem();
|
||||
$item->title = sprintf(l10n('New on %s'), $dbnow);
|
||||
$item->link = $conf['gallery_url'];
|
||||
$news = news($user['last_check'], $dbnow, true, true);
|
||||
|
||||
// content creation
|
||||
$item->description = '<ul>';
|
||||
foreach ($news as $line)
|
||||
if (count($news) > 0)
|
||||
{
|
||||
$item->description.= '<li>'.$line.'</li>';
|
||||
$item = new FeedItem();
|
||||
$item->title = sprintf(l10n('New on %s'),
|
||||
format_date($dbnow, 'mysql_datetime') );
|
||||
$item->link = $conf['gallery_url'];
|
||||
|
||||
// content creation
|
||||
$item->description = '<ul>';
|
||||
foreach ($news as $line)
|
||||
{
|
||||
$item->description.= '<li>'.$line.'</li>';
|
||||
}
|
||||
$item->description.= '</ul>';
|
||||
$item->descriptionHtmlSyndicated = true;
|
||||
|
||||
$item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
|
||||
$item->author = 'PhpWebGallery notifier';
|
||||
$item->guid= sprintf('%s', $dbnow);;
|
||||
|
||||
$rss->addItem($item);
|
||||
|
||||
$query = '
|
||||
UPDATE '.USER_FEED_TABLE.'
|
||||
SET last_check = \''.$dbnow.'\'
|
||||
WHERE id = \''.$_GET['feed'].'\'
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
$item->description.= '</ul>';
|
||||
$item->descriptionHtmlSyndicated = true;
|
||||
|
||||
$item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
|
||||
$item->author = 'PhpWebGallery notifier';
|
||||
$item->guid= sprintf('%s', $dbnow);;
|
||||
|
||||
$rss->addItem($item);
|
||||
|
||||
}
|
||||
else
|
||||
{ // update the last check to avoid deletion by maintenance task
|
||||
$query = '
|
||||
UPDATE '.USER_FEED_TABLE.'
|
||||
SET last_check = \''.$dbnow.'\'
|
||||
|
|
@ -175,7 +188,6 @@ UPDATE '.USER_FEED_TABLE.'
|
|||
pwg_query($query);
|
||||
}
|
||||
|
||||
|
||||
// build items for new images/albums
|
||||
$query = '
|
||||
SELECT date_available,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue