Same name and namespace in other branches
  1. 4.6.x modules/blog.module \blog_feed_last()
  2. 5.x modules/blog/blog.module \blog_feed_last()
  3. 6.x modules/blog/blog.pages.inc \blog_feed_last()
  4. 7.x modules/blog/blog.pages.inc \blog_feed_last()

Displays an RSS feed containing recent blog entries of all users.

File

modules/blog.module, line 102
Enables keeping an easily and regularly updated web page or a blog.

Code

function blog_feed_last() {
  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
  $channel['title'] = variable_get('site_name', 'drupal') . ' blogs';
  $channel['link'] = url('blog', NULL, NULL, TRUE);
  $channel['description'] = $term->description;
  node_feed($result, $channel);
}