function ad_admin_ads_submit in Advertisement 5
Same name and namespace in other branches
- 5.2 ad.module \ad_admin_ads_submit()
- 6.3 ad.admin.inc \ad_admin_ads_submit()
- 6 ad.admin.inc \ad_admin_ads_submit()
- 6.2 ad.admin.inc \ad_admin_ads_submit()
- 7 ad.admin.inc \ad_admin_ads_submit()
Submit the ad administration update form.
File
- ./
ad.module, line 1869 - An advertising system for Drupal powered websites.
Code
function ad_admin_ads_submit($form_id, $form_values) {
$operations = module_invoke_all('ad_operations');
$operation = $operations[$form_values['operation']];
// Filter out unchecked nodes
$ads = array_filter($form_values['ads']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$ads,
), $operation['callback arguments']);
}
else {
$args = array(
$ads,
);
}
call_user_func_array($function, $args);
cache_clear_all();
drupal_set_message(t('The update has been performed.'));
}
}