summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.module50
1 files changed, 25 insertions, 25 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index d86502782..70a6d3881 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -304,21 +304,21 @@ function taxonomy_form_vocabulary($edit = array()) {
/**
* Accept the form submission for a vocabulary and save the results.
*/
-function taxonomy_form_vocabulary_submit($form, &$form_state, $form_values) {
+function taxonomy_form_vocabulary_submit($form, &$form_state) {
// Fix up the nodes array to remove unchecked nodes.
- $form_values['nodes'] = array_filter($form_values['nodes']);
- switch (taxonomy_save_vocabulary($form_values)) {
+ $form_state['values']['nodes'] = array_filter($form_state['values']['nodes']);
+ switch (taxonomy_save_vocabulary($form_state['values'])) {
case SAVED_NEW:
- drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_values['name'])));
- watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $form_values['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_values['vid']));
+ drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_state['values']['vid']));
break;
case SAVED_UPDATED:
- drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name'])));
- watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $form_values['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_values['vid']));
+ drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_state['values']['vid']));
break;
}
- $form_state['vid'] = $form_values['vid'];
+ $form_state['vid'] = $form_state['values']['vid'];
$form_state['redirect'] = 'admin/content/taxonomy';
return;
}
@@ -393,10 +393,10 @@ function taxonomy_vocabulary_confirm_delete($vid) {
t('Cancel'));
}
-function taxonomy_vocabulary_confirm_delete_submit($form, &$form_state, $form_values) {
- $status = taxonomy_del_vocabulary($form_values['vid']);
- drupal_set_message(t('Deleted vocabulary %name.', array('%name' => $form_values['name'])));
- watchdog('taxonomy', 'Deleted vocabulary %name.', array('%name' => $form_values['name']), WATCHDOG_NOTICE);
+function taxonomy_vocabulary_confirm_delete_submit($form, &$form_state) {
+ $status = taxonomy_del_vocabulary($form_state['values']['vid']);
+ drupal_set_message(t('Deleted vocabulary %name.', array('%name' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Deleted vocabulary %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/content/taxonomy';
return;
}
@@ -479,19 +479,19 @@ function taxonomy_form_term($vocabulary, $edit = array()) {
/**
* Accept the form submission for a taxonomy term and save the result.
*/
-function taxonomy_form_term_submit($form, &$form_state, $form_values) {
- switch (taxonomy_save_term($form_values)) {
+function taxonomy_form_term_submit($form, &$form_state) {
+ switch (taxonomy_save_term($form_state['values'])) {
case SAVED_NEW:
- drupal_set_message(t('Created new term %term.', array('%term' => $form_values['name'])));
- watchdog('taxonomy', 'Created new term %term.', array('%term' => $form_values['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_values['tid']));
+ drupal_set_message(t('Created new term %term.', array('%term' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Created new term %term.', array('%term' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_state['values']['tid']));
break;
case SAVED_UPDATED:
- drupal_set_message(t('Updated term %term.', array('%term' => $form_values['name'])));
- watchdog('taxonomy', 'Updated term %term.', array('%term' => $form_values['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_values['tid']));
+ drupal_set_message(t('Updated term %term.', array('%term' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Updated term %term.', array('%term' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_state['values']['tid']));
break;
}
- $form_state['tid'] = $form_values['tid'];
+ $form_state['tid'] = $form_state['values']['tid'];
$form_state['redirect'] = 'admin/content/taxonomy';
return;
}
@@ -499,7 +499,7 @@ function taxonomy_form_term_submit($form, &$form_state, $form_values) {
/**
* Helper function for taxonomy_form_term_submit().
*
- * @param $form_values
+ * @param $form_state['values']
* @return
* Status constant indicating if term was inserted or updated.
*/
@@ -629,10 +629,10 @@ function taxonomy_term_confirm_delete($tid) {
t('Cancel'));
}
-function taxonomy_term_confirm_delete_submit($form, &$form_state, $form_values) {
- taxonomy_del_term($form_values['tid']);
- drupal_set_message(t('Deleted term %name.', array('%name' => $form_values['name'])));
- watchdog('taxonomy', 'Deleted term %name.', array('%name' => $form_values['name']), WATCHDOG_NOTICE);
+function taxonomy_term_confirm_delete_submit($form, &$form_state) {
+ taxonomy_del_term($form_state['values']['tid']);
+ drupal_set_message(t('Deleted term %name.', array('%name' => $form_state['values']['name'])));
+ watchdog('taxonomy', 'Deleted term %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/content/taxonomy';
return;
}
@@ -640,7 +640,7 @@ function taxonomy_term_confirm_delete_submit($form, &$form_state, $form_values)
/**
* Generate a form element for selecting terms from a vocabulary.
*/
-function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
+function taxonomy_form(&$form_state, $vid, $value = 0, $help = NULL, $name = 'taxonomy') {
$vocabulary = taxonomy_vocabulary_load($vid);
$help = ($help) ? $help : $vocabulary->help;
if ($vocabulary->required) {