aggregator_categorize_items_submit

Versions
6 – 7
aggregator_categorize_items_submit($form, &$form_state)

Process aggregator_categorize_items form submissions.

Code

modules/aggregator/aggregator.pages.inc, line 190

<?php
function aggregator_categorize_items_submit($form, &$form_state) {
  if (!empty($form_state['values']['categories'])) {
    foreach ($form_state['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.'));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.