Skip to content
Snippets Groups Projects
Commit ba468be6 authored by Angie Byron's avatar Angie Byron
Browse files

#658702 by Mike Wacker: Fixed shortcut derives automatic title for...

#658702 by Mike Wacker: Fixed shortcut derives automatic title for MENU_LOCAL_TASK based on parent page.
parent e2a01a03
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -505,8 +505,10 @@ function shortcut_link_delete_submit($form, &$form_state) {
*/
function shortcut_link_add_inline($shortcut_set) {
if (isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'shortcut-add-link') && shortcut_valid_link($_GET['link'])) {
$item = menu_get_item($_GET['link']);
$title = ($item && $item['title']) ? $item['title'] : $_GET['name'];
$link = array(
'link_title' => $_GET['name'],
'link_title' => $title,
'link_path' => $_GET['link'],
);
shortcut_admin_add_link($link, $shortcut_set, shortcut_max_slots());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment