You are here

function feedapi_aggregator_page_category in FeedAPI 5

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

1 string reference to 'feedapi_aggregator_page_category'
feedapi_aggregator_menu in feedapi_aggregator/feedapi_aggregator.module
Implementation of hook_menu().

File

feedapi_aggregator/feedapi_aggregator.module, line 632

Code

function feedapi_aggregator_page_category() {
  $category = db_fetch_object(db_query('SELECT cid, title FROM {feedapi_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 _feedapi_aggregator_page_list('SELECT i.*, f.nid FROM {feedapi_aggregator_category_item} c LEFT JOIN {feedapi_aggregator_item} i ON c.iid = i.iid LEFT JOIN {feedapi} f ON i.feed_nid = f.nid WHERE cid = ' . $category->cid . ' ORDER BY timestamp DESC, iid DESC', arg(3));
}