function feeds_unlock_tab_form_submit in Feeds 8.2
Same name and namespace in other branches
- 7.2 feeds.pages.inc \feeds_unlock_tab_form_submit()
Form submit handler. Resets all feeds state.
File
- ./
feeds.pages.inc, line 242 - Menu callbacks, form callbacks and helpers.
Code
function feeds_unlock_tab_form_submit($form, &$form_state) {
drupal_set_message(t('Import Unlocked'));
$form_state['redirect'] = $form['#redirect'];
$feed_nid = empty($form['#feed_nid']) ? 0 : $form['#feed_nid'];
$importer_id = $form['#importer_id'];
//Is there a more API-friendly way to set the state?
db_update('feeds_source')
->condition('id', $importer_id)
->condition('feed_nid', $feed_nid)
->fields(array(
'state' => FALSE,
))
->execute();
}