AggregatorTestCase::getFeedCategories

7 aggregator.test AggregatorTestCase::getFeedCategories($feed)
8 aggregator.test AggregatorTestCase::getFeedCategories($feed)

Pull feed categories from aggregator_category_feed table.

Parameters

$feed: Feed object representing the feed.

File

modules/aggregator/aggregator.test, line 148
Tests for aggregator.module.

Code

function getFeedCategories($feed) {
  // add the categories to the feed so we can use them
  $result = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = :fid', array(':fid' => $feed->fid));
  foreach ($result as $category) {
    $feed->categories[] = $category->cid;
  }
}
Login or register to post comments