function emfield_settings_jobqueue_submit in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 emfield.admin.inc \emfield_settings_jobqueue_submit()
- 6.3 deprecated/emfield-deprecated.admin.inc \emfield_settings_jobqueue_submit()
- 6.2 emfield.admin.inc \emfield_settings_jobqueue_submit()
For each selected content type, add all of its nodes to the job queue for reloading.
File
- ./
emfield.admin.inc, line 212 - The administrative settings page.
Code
function emfield_settings_jobqueue_submit($form, &$form_state) {
foreach ($form_state['values']['types'] as $type => $value) {
if ($value) {
$result = db_query("SELECT nid FROM {node} WHERE type = '%s'", $type);
while ($nid = db_result($result)) {
job_queue_add('emfield_reload', 'refresh emfield info', array(
$nid,
), drupal_get_path('module', 'emfield') . '/emfield.admin.inc', TRUE);
}
drupal_set_message(t('The %type nodes have been queued to reload emfield data upon cron.', array(
'%type' => $type,
)));
}
}
}