function simplenews_admin_categories_submit in Simplenews 7.2
Same name and namespace in other branches
- 7 includes/simplenews.admin.inc \simplenews_admin_categories_submit()
Form submit callback for the simplenews categories.
File
- includes/
simplenews.admin.inc, line 356 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_admin_categories_submit($form, &$form_state) {
foreach ($form_state['values'] as $newsletter_id => $newsletter) {
if (is_numeric($newsletter_id) && $form[$newsletter_id]['#newsletter']->weight != $newsletter['weight']) {
$form[$newsletter_id]['#newsletter']->weight = $newsletter['weight'];
simplenews_newsletter_save($form[$newsletter_id]['#newsletter']);
}
}
drupal_set_message(t('Your configuration has been saved.'));
}