Changeset 1636 for trunk/feed.php
- Timestamp:
- Dec 6, 2006, 2:07:03 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/feed.php
r1604 r1636 145 145 // +-----------------------------------------------------------------------+ 146 146 147 $news = news($user['last_check'], $dbnow, true, true); 148 149 if (count($news) > 0) 150 { 151 $item = new FeedItem(); 152 $item->title = sprintf(l10n('New on %s'), $dbnow); 153 $item->link = $conf['gallery_url']; 154 155 // content creation 156 $item->description = '<ul>'; 157 foreach ($news as $line) 147 if ( !isset($_GET['image_only']) ) 148 { 149 $news = news($user['last_check'], $dbnow, true, true); 150 151 if (count($news) > 0) 158 152 { 159 $item->description.= '<li>'.$line.'</li>'; 160 } 161 $item->description.= '</ul>'; 162 $item->descriptionHtmlSyndicated = true; 163 164 $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow)); 165 $item->author = 'PhpWebGallery notifier'; 166 $item->guid= sprintf('%s', $dbnow);; 167 168 $rss->addItem($item); 169 170 $query = ' 153 $item = new FeedItem(); 154 $item->title = sprintf(l10n('New on %s'), 155 format_date($dbnow, 'mysql_datetime') ); 156 $item->link = $conf['gallery_url']; 157 158 // content creation 159 $item->description = '<ul>'; 160 foreach ($news as $line) 161 { 162 $item->description.= '<li>'.$line.'</li>'; 163 } 164 $item->description.= '</ul>'; 165 $item->descriptionHtmlSyndicated = true; 166 167 $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow)); 168 $item->author = 'PhpWebGallery notifier'; 169 $item->guid= sprintf('%s', $dbnow);; 170 171 $rss->addItem($item); 172 173 $query = ' 171 174 UPDATE '.USER_FEED_TABLE.' 172 175 SET last_check = \''.$dbnow.'\' 173 176 WHERE id = \''.$_GET['feed'].'\' 174 177 ;'; 178 pwg_query($query); 179 } 180 } 181 else 182 { // update the last check to avoid deletion by maintenance task 183 $query = ' 184 UPDATE '.USER_FEED_TABLE.' 185 SET last_check = \''.$dbnow.'\' 186 WHERE id = \''.$_GET['feed'].'\' 187 ;'; 175 188 pwg_query($query); 176 189 } 177 178 190 179 191 // build items for new images/albums
Note: See TracChangeset
for help on using the changeset viewer.