From f880be0609a63046c2f8fe961467f97a8a943f10 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 6 Dec 2006 01:07:03 +0000 Subject: 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 --- feed.php | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) (limited to 'feed.php') diff --git a/feed.php b/feed.php index 8026b4def..64dc12aae 100644 --- a/feed.php +++ b/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 = ''; - $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, -- cgit v1.2.3