function nodewords_views_handler in Nodewords: D6 Meta Tags 5
Handling of edit/delete form for views.
File
- ./
nodewords.module, line 498 - Assign META tags to nodes, vocabularies, terms and pages.
Code
function nodewords_views_handler($form_id, $form_values) {
switch ($_POST['op']) {
case t('Save'):
case t('Save and edit'):
if (isset($form_values['nodewords']) && user_access('administer meta tags')) {
if ($form_values['vid'] > 0) {
_nodewords_set('views', $form_values['vid'], $form_values['nodewords']);
}
elseif ($result = db_fetch_object(db_query("SELECT * FROM {view_view} WHERE url = '%s'", $form_values['url']))) {
_nodewords_set('views', $result->vid, $form_values['nodewords']);
}
}
break;
case t('Delete'):
if ($form_values['confirm']) {
_nodewords_delete('views', $form_values['vid']);
}
break;
}
}