You are here

function aggregator_page_list_submit in Drupal 5

Same name and namespace in other branches
  1. 4 modules/aggregator.module \aggregator_page_list_submit()

File

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

Code

function aggregator_page_list_submit($form_id, $form_values) {
  foreach ($form_values['categories'] as $iid => $selection) {
    db_query('DELETE FROM {aggregator_category_item} WHERE iid = %d', $iid);
    foreach ($selection as $cid) {
      if ($cid) {
        db_query('INSERT INTO {aggregator_category_item} (cid, iid) VALUES (%d, %d)', $cid, $iid);
      }
    }
  }
  drupal_set_message(t('The categories have been saved.'));
}