You are here

function aggregator_page_category in Drupal 5

Same name and namespace in other branches
  1. 4 modules/aggregator.module \aggregator_page_category()
  2. 6 modules/aggregator/aggregator.pages.inc \aggregator_page_category()
  3. 7 modules/aggregator/aggregator.pages.inc \aggregator_page_category()

Menu callback; displays all the items aggregated in a particular category.

1 string reference to 'aggregator_page_category'
aggregator_menu in modules/aggregator/aggregator.module
Implementation of hook_menu().

File

modules/aggregator/aggregator.module, line 1068
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_page_category() {
  $category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2)));
  drupal_add_feed(url('aggregator/rss/' . arg(2)), variable_get('site_name', 'Drupal') . ' ' . t('aggregator - @title', array(
    '@title' => $category->title,
  )));
  return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = ' . $category->cid . ' ORDER BY timestamp DESC, iid DESC', arg(3));
}