Pulls feed categories from {aggregator_category_feed} table.
$feed: Feed object representing the feed.
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;
}
}