| 6 aggregator.pages.inc | aggregator_categorize_items_submit($form, &$form_state) |
| 7 aggregator.pages.inc | aggregator_categorize_items_submit($form, &$form_state) |
| 8 aggregator.pages.inc | aggregator_categorize_items_submit($form, &$form_state) |
Process aggregator_categorize_items form submissions.
1 string reference to 'aggregator_categorize_items_submit'
File
- modules/
aggregator/ aggregator.pages.inc, line 190 - User page callbacks for the aggregator module.
Code
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