Commit c9de4646 authored by Dries's avatar Dries

- Patch #907690 by sun, pwolanin: breadcrumbs don't work for dynamic paths and local tasks #2.

parent 4bd74a00
......@@ -230,7 +230,7 @@ function drupal_get_profile() {
function drupal_set_breadcrumb($breadcrumb = NULL) {
$stored_breadcrumb = &drupal_static(__FUNCTION__);
if (!is_null($breadcrumb)) {
if (isset($breadcrumb)) {
$stored_breadcrumb = $breadcrumb;
}
return $stored_breadcrumb;
......@@ -242,7 +242,7 @@ function drupal_set_breadcrumb($breadcrumb = NULL) {
function drupal_get_breadcrumb() {
$breadcrumb = drupal_set_breadcrumb();
if (is_null($breadcrumb)) {
if (!isset($breadcrumb)) {
$breadcrumb = menu_get_active_breadcrumb();
}
......@@ -2267,9 +2267,9 @@ function l($text, $path, array $options = array()) {
// Merge in defaults.
$options += array(
'attributes' => array(),
'html' => FALSE,
);
'attributes' => array(),
'html' => FALSE,
);
// Append active class.
if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
......@@ -6204,7 +6204,7 @@ function drupal_write_record($table, &$record, $primary_keys = array()) {
}
if (!property_exists($object, $field)) {
// Skip fields that are not provided, default values are already known
// Skip fields that are not provided, default values are already known
// by the database.
continue;
}
......
This diff is collapsed.
......@@ -2240,7 +2240,6 @@ function template_preprocess_page(&$variables) {
$variables['base_path'] = base_path();
$variables['front_page'] = url();
$variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
$variables['feed_icons'] = drupal_get_feeds();
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
......@@ -2252,7 +2251,6 @@ function template_preprocess_page(&$variables) {
$variables['site_name'] = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
$variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
$variables['tabs'] = theme('menu_local_tasks');
$variables['title'] = drupal_get_title();
if ($node = menu_get_object()) {
$variables['node'] = $node;
......@@ -2264,6 +2262,28 @@ function template_preprocess_page(&$variables) {
}
}
/**
* Process variables for page.tpl.php
*
* Perform final addition of variables before passing them into the template.
* To customize these variables, simply set them in an earlier step.
*
* @see template_preprocess_page()
* @see page.tpl.php
*/
function template_process_page(&$variables) {
if (!isset($variables['breadcrumb'])) {
// Build the breadcrumb last, so as to increase the chance of being able to
// re-use the cache of an already rendered menu containing the active link
// for the current page.
// @see menu_tree_page_data()
$variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
}
if (!isset($variables['title'])) {
$variables['title'] = drupal_get_title();
}
}
/**
* Process variables for html.tpl.php
*
......
......@@ -134,7 +134,6 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_admin_remove_feed', 5),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
$items['admin/config/services/aggregator/update/%aggregator_feed'] = array(
......@@ -142,7 +141,6 @@ function aggregator_menu() {
'page callback' => 'aggregator_admin_refresh_feed',
'page arguments' => array(5),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
$items['admin/config/services/aggregator/list'] = array(
......@@ -227,7 +225,6 @@ function aggregator_menu() {
'page callback' => 'aggregator_page_source',
'page arguments' => array(2),
'access arguments' => array('access news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.pages.inc',
);
$items['aggregator/sources/%aggregator_feed/view'] = array(
......@@ -257,7 +254,6 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_feed', 6),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
$items['admin/config/services/aggregator/edit/category/%aggregator_category'] = array(
......@@ -265,7 +261,6 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_category', 6),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
......
......@@ -182,7 +182,6 @@ function book_menu() {
'access callback' => '_book_outline_remove_access',
'access arguments' => array(1),
'theme callback' => '_node_custom_theme',
'type' => MENU_CALLBACK,
'file' => 'book.pages.inc',
);
......
......@@ -241,7 +241,6 @@ function comment_menu() {
'page callback' => 'comment_permalink',
'page arguments' => array(1),
'access arguments' => array('access comments'),
'type' => MENU_CALLBACK,
);
$items['comment/%/view'] = array(
'title' => 'View comment',
......@@ -264,7 +263,6 @@ function comment_menu() {
'page callback' => 'comment_approve',
'page arguments' => array(1),
'access arguments' => array('administer comments'),
'type' => MENU_CALLBACK,
'file' => 'comment.pages.inc',
'weight' => 1,
);
......@@ -283,7 +281,6 @@ function comment_menu() {
'page arguments' => array(2),
'access callback' => 'node_access',
'access arguments' => array('view', 2),
'type' => MENU_CALLBACK,
'file' => 'comment.pages.inc',
);
......
......@@ -77,7 +77,6 @@ function contact_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('contact_category_edit_form', 4),
'access arguments' => array('administer contact forms'),
'type' => MENU_CALLBACK,
'file' => 'contact.admin.inc',
);
$items['admin/structure/contact/delete/%contact'] = array(
......@@ -85,7 +84,6 @@ function contact_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('contact_category_delete_form', 4),
'access arguments' => array('administer contact forms'),
'type' => MENU_CALLBACK,
'file' => 'contact.admin.inc',
);
$items['contact'] = array(
......
......@@ -53,7 +53,6 @@ function dashboard_menu() {
'page callback' => 'dashboard_admin',
'page arguments' => array(TRUE),
'access arguments' => array('access dashboard'),
'type' => MENU_CALLBACK,
);
$items['admin/dashboard/drawer'] = array(
'page callback' => 'dashboard_show_disabled',
......
......@@ -67,7 +67,6 @@ function dblog_menu() {
'page callback' => 'dblog_event',
'page arguments' => array(3),
'access arguments' => array('access site reports'),
'type' => MENU_CALLBACK,
'file' => 'dblog.admin.inc',
);
......
......@@ -77,7 +77,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_test_entity_save($entity);
// With no field data, no buttons are checked.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoFieldChecked("edit-card-1-$langcode-0");
$this->assertNoFieldChecked("edit-card-1-$langcode-1");
$this->assertNoFieldChecked("edit-card-1-$langcode-2");
......@@ -89,7 +89,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_1', $langcode, array(0));
// Check that the selected button is checked.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-card-1-$langcode-0");
$this->assertNoFieldChecked("edit-card-1-$langcode-1");
$this->assertNoFieldChecked("edit-card-1-$langcode-2");
......@@ -104,7 +104,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_update_field($this->card_1);
$instance['required'] = TRUE;
field_update_instance($instance);
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-card-1-$langcode-99");
}
......@@ -134,7 +134,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_test_entity_save($entity);
// Display form: with no field data, nothing is checked.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoFieldChecked("edit-card-2-$langcode-0");
$this->assertNoFieldChecked("edit-card-2-$langcode-1");
$this->assertNoFieldChecked("edit-card-2-$langcode-2");
......@@ -150,7 +150,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0, 2));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-card-2-$langcode-0");
$this->assertNoFieldChecked("edit-card-2-$langcode-1");
$this->assertFieldChecked("edit-card-2-$langcode-2");
......@@ -165,7 +165,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-card-2-$langcode-0");
$this->assertNoFieldChecked("edit-card-2-$langcode-1");
$this->assertNoFieldChecked("edit-card-2-$langcode-2");
......@@ -194,7 +194,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_update_field($this->card_2);
$instance['required'] = TRUE;
field_update_instance($instance);
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-card-2-$langcode-99");
}
......@@ -222,7 +222,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_test_entity_save($entity);
// Display form.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
// A required field without any value has a "none" option.
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', array(':id' => 'edit-card-1-' . $langcode, ':label' => t('- Select a value -'))), t('A required select list has a "Select a value" choice.'));
......@@ -244,7 +244,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_1', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
// A required field with a value has no 'none' option.
$this->assertFalse($this->xpath('//select[@id=:id]//option[@value="_none"]', array(':id' => 'edit-card-1-' . $langcode)), t('A required select list with an actual value has no "none" choice.'));
$this->assertOptionSelected("edit-card-1-$langcode", 0);
......@@ -256,12 +256,12 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_update_instance($instance);
// Display form.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
// A non-required field has a 'none' option.
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', array(':id' => 'edit-card-1-' . $langcode, ':label' => t('- None -'))), t('A non-required select list has a "None" choice.'));
// Submit form: Unselect the option.
$edit = array("card_1[$langcode]" => '_none');
$this->drupalPost('test-entity/' . $entity->ftid .'/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_1', $langcode, array());
// Test optgroups.
......@@ -271,7 +271,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_update_field($this->card_1);
// Display form: with no field data, nothing is selected
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoOptionSelected("edit-card-1-$langcode", 0);
$this->assertNoOptionSelected("edit-card-1-$langcode", 1);
$this->assertNoOptionSelected("edit-card-1-$langcode", 2);
......@@ -284,14 +284,14 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_1', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertOptionSelected("edit-card-1-$langcode", 0);
$this->assertNoOptionSelected("edit-card-1-$langcode", 1);
$this->assertNoOptionSelected("edit-card-1-$langcode", 2);
// Submit form: Unselect the option.
$edit = array("card_1[$langcode]" => '_none');
$this->drupalPost('test-entity/' . $entity->ftid .'/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_1', $langcode, array());
}
......@@ -318,7 +318,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_test_entity_save($entity);
// Display form: with no field data, nothing is selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoOptionSelected("edit-card-2-$langcode", 0);
$this->assertNoOptionSelected("edit-card-2-$langcode", 1);
$this->assertNoOptionSelected("edit-card-2-$langcode", 2);
......@@ -330,7 +330,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0, 2));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertOptionSelected("edit-card-2-$langcode", 0);
$this->assertNoOptionSelected("edit-card-2-$langcode", 1);
$this->assertOptionSelected("edit-card-2-$langcode", 2);
......@@ -341,7 +341,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertOptionSelected("edit-card-2-$langcode", 0);
$this->assertNoOptionSelected("edit-card-2-$langcode", 1);
$this->assertNoOptionSelected("edit-card-2-$langcode", 2);
......@@ -361,18 +361,18 @@ class OptionsWidgetsTestCase extends FieldTestCase {
// Check that the 'none' option has no efect if actual options are selected
// as well.
$edit = array("card_2[$langcode][]" => array('_none' => '_none', 0 => 0));
$this->drupalPost('test-entity/' . $entity->ftid .'/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0));
// Check that selecting the 'none' option empties the field.
$edit = array("card_2[$langcode][]" => array('_none' => '_none'));
$this->drupalPost('test-entity/' . $entity->ftid .'/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', $langcode, array());
// A required select list does not have an empty key.
$instance['required'] = TRUE;
field_update_instance($instance);
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFalse($this->xpath('//select[@id=:id]//option[@value=""]', array(':id' => 'edit-card-2-' . $langcode)), t('A required select list does not have an empty key.'));
// We do not have to test that a required select list with one option is
......@@ -388,7 +388,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_update_instance($instance);
// Display form: with no field data, nothing is selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoOptionSelected("edit-card-2-$langcode", 0);
$this->assertNoOptionSelected("edit-card-2-$langcode", 1);
$this->assertNoOptionSelected("edit-card-2-$langcode", 2);
......@@ -401,14 +401,14 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'card_2', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertOptionSelected("edit-card-2-$langcode", 0);
$this->assertNoOptionSelected("edit-card-2-$langcode", 1);
$this->assertNoOptionSelected("edit-card-2-$langcode", 2);
// Submit form: Unselect the option.
$edit = array("card_2[$langcode][]" => array('_none' => '_none'));
$this->drupalPost('test-entity/' . $entity->ftid .'/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', $langcode, array());
}
......@@ -435,7 +435,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
field_test_entity_save($entity);
// Display form: with no field data, option is unchecked.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoFieldChecked("edit-bool-$langcode");
$this->assertRaw('Some dangerous &amp; unescaped <strong>markup</strong>', t('Option text was properly filtered.'));
......@@ -445,7 +445,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'bool', $langcode, array(0));
// Display form: check that the right options are selected.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertFieldChecked("edit-bool-$langcode");
// Submit form: uncheck the option.
......@@ -454,7 +454,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, 'bool', $langcode, array(1));
// Display form: with 'off' value, option is unchecked.
$this->drupalGet('test-entity/' . $entity->ftid .'/edit');
$this->drupalGet('test-entity/manage/' . $entity->ftid . '/edit');
$this->assertNoFieldChecked("edit-bool-$langcode");
}
}
......
......@@ -115,7 +115,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
"{$this->field_name}[$langcode][0][value]" => $value,
);
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), t('Entity was created'));
......@@ -184,7 +184,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
"{$this->field_name}[$langcode][0][value]" => $value,
);
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), t('Entity was created'));
......@@ -210,7 +210,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
// Display edition form.
// We should now have a 'text format' selector.
$this->drupalGet('test-entity/' . $id . '/edit');
$this->drupalGet('test-entity/manage/' . $id . '/edit');
$this->assertFieldByName("{$this->field_name}[$langcode][0][value]", '', t('Widget is displayed'));
$this->assertFieldByName("{$this->field_name}[$langcode][0][format]", '', t('Format selector is displayed'));
......
......@@ -1259,14 +1259,14 @@ class FieldFormTestCase extends FieldTestCase {
$value = mt_rand(1, 127);
$edit = array("{$this->field_name}[$langcode][0][value]" => $value);
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
$entity = field_test_entity_test_load($id);
$this->assertEqual($entity->{$this->field_name}[$langcode][0]['value'], $value, 'Field value was saved');
// Display edit form.
$this->drupalGet('test-entity/' . $id . '/edit');
$this->drupalGet('test-entity/manage/' . $id . '/edit');
$this->assertFieldByName("{$this->field_name}[$langcode][0][value]", $value, 'Widget is displayed with the correct default value');
$this->assertNoField("{$this->field_name}[$langcode][1][value]", 'No extraneous widget is displayed');
......@@ -1281,7 +1281,7 @@ class FieldFormTestCase extends FieldTestCase {
// Empty the field.
$value = '';
$edit = array("{$this->field_name}[$langcode][0][value]" => $value);
$this->drupalPost('test-entity/' . $id . '/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $id . '/edit', $edit, t('Save'));
$this->assertRaw(t('test_entity @id has been updated.', array('@id' => $id)), 'Entity was updated');
$entity = field_test_entity_test_load($id);
$this->assertIdentical($entity->{$this->field_name}, array(), 'Field was emptied');
......@@ -1306,7 +1306,7 @@ class FieldFormTestCase extends FieldTestCase {
$value = mt_rand(1, 127);
$edit = array("{$this->field_name}[$langcode][0][value]" => $value);
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
$entity = field_test_entity_test_load($id);
......@@ -1315,7 +1315,7 @@ class FieldFormTestCase extends FieldTestCase {
// Edit with missing required value.
$value = '';
$edit = array("{$this->field_name}[$langcode][0][value]" => $value);
$this->drupalPost('test-entity/' . $id . '/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $id . '/edit', $edit, t('Save'));
$this->assertRaw(t('!name field is required.', array('!name' => $this->instance['label'])), 'Required field with no value fails validation');
}
......@@ -1384,7 +1384,7 @@ class FieldFormTestCase extends FieldTestCase {
// Submit the form and create the entity.
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
$entity = field_test_entity_test_load($id);
......@@ -1474,7 +1474,7 @@ class FieldFormTestCase extends FieldTestCase {
// Create entity with three values.
$edit = array("{$this->field_name}[$langcode]" => '1, 2, 3');
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
// Check that the values were saved.
......@@ -1482,7 +1482,7 @@ class FieldFormTestCase extends FieldTestCase {
$this->assertFieldValues($entity_init, $this->field_name, $langcode, array(1, 2, 3));
// Display the form, check that the values are correctly filled in.
$this->drupalGet('test-entity/' . $id . '/edit');
$this->drupalGet('test-entity/manage/' . $id . '/edit');
$this->assertFieldByName("{$this->field_name}[$langcode]", '1, 2, 3', t('Widget is displayed.'));
// Submit the form with more values than the field accepts.
......@@ -1529,7 +1529,7 @@ class FieldFormTestCase extends FieldTestCase {
// Create entity.
$edit = array("{$field_name}[$langcode][0][value]" => 1);
$this->drupalPost(NULL, $edit, t('Save'));
preg_match('|test-entity/(\d+)/edit|', $this->url, $match);
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
// Check that the default value was saved.
......@@ -1539,7 +1539,7 @@ class FieldFormTestCase extends FieldTestCase {
// Create a new revision.
$edit = array("{$field_name}[$langcode][0][value]" => 2, 'revision' => TRUE);
$this->drupalPost('test-entity/' . $id . '/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $id . '/edit', $edit, t('Save'));
// Check that the new revision has the expected values.
$entity = field_test_entity_test_load($id);
......@@ -2721,7 +2721,7 @@ class FieldTranslationsTestCase extends FieldTestCase {
// Create a new revision.
$langcode = field_valid_language(NULL);
$edit = array("{$field_name}[$langcode][0][value]" => $entity->{$field_name}[$langcode][0]['value'], 'revision' => TRUE);
$this->drupalPost('test-entity/' . $eid . '/edit', $edit, t('Save'));
$this->drupalPost('test-entity/manage/' . $eid . '/edit', $edit, t('Save'));
// Check translation revisions.
$this->checkTranslationRevisions($eid, $eid, $available_languages);
......
......@@ -392,7 +392,7 @@ function field_test_entity_form_submit($form, &$form_state) {
drupal_set_message($message);
if ($entity->ftid) {
$form_state['redirect'] = 'test-entity/' . $entity->ftid . '/edit';
$form_state['redirect'] = 'test-entity/manage/' . $entity->ftid . '/edit';
}
else {
// Error on save.
......
......@@ -52,10 +52,10 @@ function field_test_menu() {
'type' => MENU_NORMAL_ITEM,
);
}
$items['test-entity/%field_test_entity_test/edit'] = array(
$items['test-entity/manage/%field_test_entity_test/edit'] = array(
'title' => 'Edit test entity',
'page callback' => 'field_test_entity_edit',
'page arguments' => array(1),
'page arguments' => array(2),
'access arguments' => array('administer field_test content'),
'type' => MENU_NORMAL_ITEM,
);
......
......@@ -114,7 +114,6 @@ function field_ui_menu() {
'title arguments' => array($field_position),
'page callback' => 'drupal_get_form',
'page arguments' => array('field_ui_field_edit_form', $field_position),
'type' => MENU_LOCAL_TASK,
'file' => 'field_ui.admin.inc',
) + $access;
$items["$path/fields/%field_ui_menu/edit"] = array(
......
......@@ -114,7 +114,6 @@ function filter_menu() {
'file' => 'filter.admin.inc',
);
$items['admin/config/content/formats/%filter_format'] = array(
'type' => MENU_CALLBACK,
'title callback' => 'filter_admin_format_title',
'title arguments' => array(4),
'page callback' => 'filter_admin_format_page',
......@@ -128,7 +127,6 @@ function filter_menu() {
'page arguments' => array('filter_admin_disable', 4),
'access callback' => '_filter_disable_format_access',
'access arguments' => array(4),
'type' => MENU_CALLBACK,
'file' => 'filter.admin.inc',
);
return $items;
......
......@@ -147,7 +147,6 @@ function forum_menu() {
'page callback' => 'forum_form_main',
'page arguments' => array('container', 5),
'access arguments' => array<