summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-12-31 16:00:21 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2011-12-31 16:00:21 -0800
commit8703bb7b3d83f79c3a1453f17a8f4eb9da9f442f (patch)
tree50c109fa0bb00c1ce4eecc97d9834c6834dd8646 /modules/taxonomy
parent5f9bb354ef83b7e8c3cfaad5e8ab95b435ae47f5 (diff)
downloadbrdo-8703bb7b3d83f79c3a1453f17a8f4eb9da9f442f.tar.gz
brdo-8703bb7b3d83f79c3a1453f17a8f4eb9da9f442f.tar.bz2
Issue #1359710 by xjm, pwolanin: Fixed taxonomy_menu() passes invalid arguments into taxonomy_form_term().
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.module4
-rw-r--r--modules/taxonomy/taxonomy.test4
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 8230e7e6a..fb443ed49 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -295,7 +295,9 @@ function taxonomy_menu() {
$items['taxonomy/term/%taxonomy_term/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
- 'page arguments' => array('taxonomy_form_term', 2),
+ // Pass a NULL argument to ensure that additional path components are not
+ // passed to taxonomy_form_term() as the vocabulary machine name argument.
+ 'page arguments' => array('taxonomy_form_term', 2, NULL),
'access callback' => 'taxonomy_term_edit_access',
'access arguments' => array(2),
'type' => MENU_LOCAL_TASK,
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 03fdcb095..eb1324337 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -703,6 +703,10 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
// Check that the term feed page is working.
$this->drupalGet('taxonomy/term/' . $term->tid . '/feed');
+ // Check that the term edit page does not try to interpret additional path
+ // components as arguments for taxonomy_form_term().
+ $this->drupalGet('taxonomy/term/' . $term->tid . '/edit/' . $this->randomName());
+
// Delete the term.
$this->drupalPost('taxonomy/term/' . $term->tid . '/edit', array(), t('Delete'));
$this->drupalPost(NULL, NULL, t('Delete'));