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

File

modules/aggregator.module, line 1146
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.'));
}