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',
);
......
This diff is collapsed.
......@@ -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('administer forums'),
'type' => MENU_CALLBACK,
'file' => 'forum.admin.inc',
);
$items['admin/structure/forum/edit/forum/%taxonomy_term'] = array(
......@@ -155,7 +154,6 @@ function forum_menu() {
'page callback' => 'forum_form_main',
'page arguments' => array('forum', 5),
'access arguments' => array('administer forums'),
'type' => MENU_CALLBACK,
'file' => 'forum.admin.inc',
);
return $items;
......
......@@ -25,9 +25,25 @@ class ForumTestCase extends DrupalWebTestCase {
function setUp() {
parent::setUp('taxonomy', 'comment', 'forum');
// Create users.
$this->admin_user = $this->drupalCreateUser(array('administer blocks', 'administer forums', 'administer menu', 'administer taxonomy', 'create forum content')); // 'access administration pages'));
$this->edit_any_topics_user = $this->drupalCreateUser(array('create forum content', 'edit any forum content', 'delete any forum content', 'access administration pages'));
$this->edit_own_topics_user = $this->drupalCreateUser(array('create forum content', 'edit own forum content', 'delete own forum content'));
$this->admin_user = $this->drupalCreateUser(array(
'access administration pages',
'administer blocks',
'administer forums',
'administer menu',
'administer taxonomy',
'create forum content',
));
$this->edit_any_topics_user = $this->drupalCreateUser(array(
'access administration pages',
'create forum content',
'edit any forum content',
'delete any forum content',
));
$this->edit_own_topics_user = $this->drupalCreateUser(array(
'create forum content',
'edit own forum content',
'delete own forum content',
));
$this->web_user = $this->drupalCreateUser(array());
}
......
......@@ -25,7 +25,6 @@ function help_menu() {
'page callback' => 'help_page',
'page arguments' => array(2),
'access arguments' => array('access administration pages'),
'type' => MENU_CALLBACK,
'file' => 'help.admin.inc',
);
}
......
......@@ -125,7 +125,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_style_form', 5),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
$items['admin/config/media/image-styles/delete/%image_style'] = array(
......@@ -135,7 +134,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_style_delete_form', 5),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
$items['admin/config/media/image-styles/revert/%image_style'] = array(
......@@ -145,7 +143,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_style_revert_form', 5),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
$items['admin/config/media/image-styles/edit/%image_style/effects/%image_effect'] = array(
......@@ -155,7 +152,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_effect_form', 5, 7),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
$items['admin/config/media/image-styles/edit/%image_style/effects/%image_effect/delete'] = array(
......@@ -165,7 +161,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_effect_delete_form', 5, 7),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
$items['admin/config/media/image-styles/edit/%image_style/add/%image_effect_definition'] = array(
......@@ -175,7 +170,6 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_effect_form', 5, 7),
'access arguments' => array('administer image styles'),
'type' => MENU_CALLBACK,
'file' => 'image.admin.inc',
);
......
......@@ -150,7 +150,6 @@ function locale_menu() {
'page arguments' => array('locale_languages_edit_form', 5),
'access arguments' => array('administer languages'),
'file' => 'locale.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/config/regional/language/delete/%'] = array(
'title' => 'Confirm',
......@@ -158,7 +157,6 @@ function locale_menu() {
'page arguments' => array('locale_languages_delete_form', 5),
'access arguments' => array('administer languages'),
'file' => 'locale.admin.inc',
'type' => MENU_CALLBACK,
);
// Translation functionality
......@@ -205,7 +203,6 @@ function locale_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_translate_edit_form', 5),
'access arguments' => array('translate interface'),
'type' => MENU_CALLBACK,
'file' => 'locale.admin.inc',
);
$items['admin/config/regional/translate/delete/%'] = array(
......@@ -213,7 +210,6 @@ function locale_menu() {
'page callback' => 'locale_translate_delete_page',
'page arguments' => array(5),
'access arguments' => array('translate interface'),
'type' => MENU_CALLBACK,
'file' => 'locale.admin.inc',
);
......@@ -233,7 +229,6 @@ function locale_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_date_format_form', 5),
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
'file' => 'locale.admin.inc',
);
$items['admin/config/regional/date-time/locale/%/reset'] = array(
......@@ -242,7 +237,6 @@ function locale_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_date_format_reset_form', 5),
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
'file' => 'locale.admin.inc',
);
......
......@@ -95,7 +95,6 @@ function menu_menu() {
'title callback' => 'menu_overview_title',
'title arguments' => array(4),
'access arguments' => array('administer menu'),
'type' => MENU_CALLBACK,
'file' => 'menu.admin.inc',
);
$items['admin/structure/menu/manage/%menu/list'] = array(
......@@ -126,7 +125,6 @@ function menu_menu() {
'page callback' => 'menu_delete_menu_page',
'page arguments' => array(4),
'access arguments' => array('administer menu'),
'type' => MENU_CALLBACK,
'file' => 'menu.admin.inc',
);
$items['admin/structure/menu/item/%menu_link/edit'] = array(
......@@ -134,7 +132,6 @@ function menu_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('menu_edit_item', 'edit', 4, NULL),
'access arguments' => array('administer menu'),
'type' => MENU_CALLBACK,
'file' => 'menu.admin.inc',
);
$items['admin/structure/menu/item/%menu_link/reset'] = array(
......@@ -142,7 +139,6 @@ function menu_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('menu_reset_item_confirm', 4),
'access arguments' => array('administer menu'),
'type' => MENU_CALLBACK,
'file' => 'menu.admin.inc',
);
$items['admin/structure/menu/item/%menu_link/delete'] = array(
......@@ -150,7 +146,6 @@ function menu_menu() {
'page callback' => 'menu_item_delete_page',
'page arguments' => array(4),
'access arguments' => array('administer menu'),
'type' => MENU_CALLBACK,
'file' => 'menu.admin.inc',
);
return $items;
......@@ -707,7 +702,7 @@ function menu_form_node_type_form_alter(&$form, $form_state) {
$form['menu']['menu_options'] = array(
'#type' => 'checkboxes',
'#title' => t('Available menus'),
'#default_value' => variable_get('menu_options_' . $type->type, array('main-menu' => 'main-menu')),
'#default_value' => variable_get('menu_options_' . $type->type, array('main-menu')),
'#options' => $menu_options,
'#description' => t('The menus available to place links in for this content type.'),
);
......
......@@ -112,14 +112,14 @@ class MenuTestCase extends DrupalWebTestCase {
// Assert the new menu.
$this->drupalGet('admin/structure/menu/manage/' . $menu_name . '/edit');
$this->assertText($title, t('Custom menu was added.'));
$this->assertRaw($title, t('Custom menu was added.'));
// Edit the menu.
$new_title = $this->randomName(16);
$menu['title'] = $new_title;
menu_save($menu);
$this->drupalGet('admin/structure/menu/manage/' . $menu_name . '/edit');
$this->assertText($new_title, t('Custom menu was edited.'));
$this->assertRaw($new_title, t('Custom menu was edited.'));
}
/**
......
......@@ -1844,12 +1844,10 @@ function node_menu() {
'title' => 'Delete',
'page arguments' => array('node_type_delete_confirm', 4),
'access arguments' => array('administer content types'),
'type' => MENU_CALLBACK,
'file' => 'content_types.inc',
);
$items['node'] = array(
'title' => 'Content',
'page callback' => 'node_page_default',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
......@@ -1895,7 +1893,6 @@ function node_menu() {
'page arguments' => array(1),
'access callback' => 'node_access',
'access arguments' => array('view', 1),
'type' => MENU_CALLBACK,
);
$items['node/%node/view'] = array(
'title' => 'View',
......@@ -1943,7 +1940,6 @@ function node_menu() {
'page arguments' => array(1, TRUE),
'access callback' => '_node_revision_access',
'access arguments' => array(1),
'type' => MENU_CALLBACK,
);
$items['node/%node/revisions/%/revert'] = array(
'title' => 'Revert to earlier revision',
......@@ -1952,7 +1948,6 @@ function node_menu() {
'page arguments' => array('node_revision_revert_confirm', 1),
'access callback' => '_node_revision_access',
'access arguments' => array(1, 'update'),
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
);
$items['node/%node/revisions/%/delete'] = array(
......@@ -1962,7 +1957,6 @@ function node_menu() {
'page arguments' => array('node_revision_delete_confirm', 1),
'access callback' => '_node_revision_access',
'access arguments' => array(1, 'delete'),
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
);
return $items;
......
......@@ -32,7 +32,6 @@ function openid_menu() {
'page arguments' => array('openid_user_delete_form', 1),
'access callback' => 'user_edit_access',
'access arguments' => array(1),
'type' => MENU_CALLBACK,
'file' => 'openid.pages.inc',
);
return $items;
......
......@@ -66,7 +66,6 @@ function path_menu() {
'page callback' => 'path_admin_edit',
'page arguments' => array(5),
'access arguments' => array('administer url aliases'),
'type' => MENU_CALLBACK,
'file' => 'path.admin.inc',
);
$items['admin/config/search/path/delete/%path'] = array(
......@@ -74,7 +73,6 @@ function path_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('path_admin_delete_confirm', 5),
'access arguments' => array('administer url aliases'),
'type' => MENU_CALLBACK,
'file' => 'path.admin.inc',
);
$items['admin/config/search/path/list'] = array(
......
......@@ -99,7 +99,6 @@ function profile_menu() {
'page arguments' => array('profile_field_form'),
'access arguments' => array('administer users'),
'file' => 'profile.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/config/people/profile/autocomplete'] = array(
'title' => 'Profile category autocomplete',
......@@ -114,7 +113,6 @@ function profile_menu() {
'page arguments' => array('profile_field_form'),
'access arguments' => array('administer users'),
'file' => 'profile.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/config/people/profile/delete'] = array(
'title' => 'Delete field',
......@@ -122,7 +120,6 @@ function profile_menu() {
'page arguments' => array('profile_field_delete'),
'access arguments' => array('administer users'),
'file' => 'profile.admin.inc',
'type' => MENU_CALLBACK,
);
$items['profile/autocomplete'] = array(
'title' => 'Profile autocomplete',
......
......@@ -182,7 +182,6 @@ function search_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('search_reindex_confirm'),
'access arguments' => array('administer search'),
'type' => MENU_CALLBACK,