summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.admin.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-25 11:53:25 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-25 11:53:25 +0000
commitcca8e7e5acf71bc1462ef9197858a1629e96e6a3 (patch)
tree2e7b9e1cceb586d9d49c13ea89d211ab43a4894a /modules/taxonomy/taxonomy.admin.inc
parentcfe7f8e69f9156284e1daf57921d89de256abda2 (diff)
downloadbrdo-cca8e7e5acf71bc1462ef9197858a1629e96e6a3.tar.gz
brdo-cca8e7e5acf71bc1462ef9197858a1629e96e6a3.tar.bz2
- Patch #744258 by sun: admin/structure/taxonomy paths have to use machine_name(), not vid.
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 31856e2db..55ef4d6c9 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -20,9 +20,9 @@ function taxonomy_overview_vocabularies($form) {
$form[$vocabulary->vid]['#vocabulary'] = $vocabulary;
$form[$vocabulary->vid]['name'] = array('#markup' => check_plain($vocabulary->name));
$form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight);
- $form[$vocabulary->vid]['edit'] = array('#type' => 'link', '#title' => t('edit vocabulary'), '#href' => "admin/structure/taxonomy/$vocabulary->vid/edit");
- $form[$vocabulary->vid]['list'] = array('#type' => 'link', '#title' => t('list terms'), '#href' => "admin/structure/taxonomy/$vocabulary->vid");
- $form[$vocabulary->vid]['add'] = array('#type' => 'link', '#title' => t('add terms'), '#href' => "admin/structure/taxonomy/$vocabulary->vid/add");
+ $form[$vocabulary->vid]['edit'] = array('#type' => 'link', '#title' => t('edit vocabulary'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name/edit");
+ $form[$vocabulary->vid]['list'] = array('#type' => 'link', '#title' => t('list terms'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name");
+ $form[$vocabulary->vid]['add'] = array('#type' => 'link', '#title' => t('add terms'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name/add");
}
// Only make this form include a submit button and weight if more than one
@@ -209,12 +209,12 @@ function taxonomy_form_vocabulary_submit($form, &$form_state) {
switch (taxonomy_vocabulary_save($vocabulary)) {
case SAVED_NEW:
drupal_set_message(t('Created new vocabulary %name.', array('%name' => $vocabulary->name)));
- watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->vid . '/edit'));
+ watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
break;
case SAVED_UPDATED:
drupal_set_message(t('Updated vocabulary %name.', array('%name' => $vocabulary->name)));
- watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->vid . '/edit'));
+ watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
break;
}
@@ -378,7 +378,7 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
$form['#page_entries'] = $page_entries;
$form['#back_step'] = $back_step;
$form['#forward_step'] = $forward_step;
- $form['#empty_text'] = t('No terms available. <a href="@link">Add term</a>.', array('@link' => url('admin/structure/taxonomy/' . $vocabulary->vid . '/add')));
+ $form['#empty_text'] = t('No terms available. <a href="@link">Add term</a>.', array('@link' => url('admin/structure/taxonomy/' . $vocabulary->machine_name . '/add')));
if ($vocabulary->hierarchy < 2 && count($tree) > 1) {
$form['submit'] = array(
@@ -941,12 +941,13 @@ function taxonomy_vocabulary_confirm_reset_alphabetical($form, &$form_state, $vi
$form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
$form['vid'] = array('#type' => 'value', '#value' => $vid);
+ $form['machine_name'] = array('#type' => 'value', '#value' => $vocabulary->machine_name);
$form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
$form['reset_alphabetical'] = array('#type' => 'value', '#value' => TRUE);
return confirm_form($form,
t('Are you sure you want to reset the vocabulary %title to alphabetical order?',
array('%title' => $vocabulary->name)),
- 'admin/structure/taxonomy/' . $vid,
+ 'admin/structure/taxonomy/' . $vocabulary->machine_name,
t('Resetting a vocabulary will discard all custom ordering and sort items alphabetically.'),
t('Reset to alphabetical'),
t('Cancel'));
@@ -964,5 +965,5 @@ function taxonomy_vocabulary_confirm_reset_alphabetical_submit($form, &$form_sta
->execute();
drupal_set_message(t('Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name'])));
watchdog('taxonomy', 'Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
- $form_state['redirect'] = 'admin/structure/taxonomy/' . $form_state['values']['vid'];
+ $form_state['redirect'] = 'admin/structure/taxonomy/' . $form_state['values']['machine_name'];
}