I am trying to drop all items in a feed and then re-import all items again.
In a D5 site where this worked in my module I used:
function mymodule_cron(){
aggregator_remove('1');
aggregator_refresh(aggregator_get_feed('1'));
aggregator_remove('2');
aggregator_refresh(aggregator_get_feed('2'));
}
however this no longer works in D7, so I tried adapting it to:
function mymodule_cron(){
aggregator_remove('1');
aggregator_refresh(aggregator_load('1'));
aggregator_remove('2');
aggregator_refresh(aggregator_load('2'));
}
I appear to be parsing a feed object to the aggregator_remove function but when I run cron or even if I run the code via drush it doesn't remove existing feed items.
Has anyone got any insights into where I am going wrong here?
