Issue #1359710 by pwolanin, xjm: Fixed taxonomy_menu() passes invalid arguments into taxonomy_form_term().
parent
06373cfba5
commit
6630a4eb5f
|
@ -310,7 +310,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,
|
||||
|
|
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue