summaryrefslogtreecommitdiff
path: root/modules/shortcut
diff options
context:
space:
mode:
Diffstat (limited to 'modules/shortcut')
-rw-r--r--modules/shortcut/shortcut.admin.js2
-rw-r--r--modules/shortcut/shortcut.module24
2 files changed, 22 insertions, 4 deletions
diff --git a/modules/shortcut/shortcut.admin.js b/modules/shortcut/shortcut.admin.js
index 5554e5a7c..422cc4ce3 100644
--- a/modules/shortcut/shortcut.admin.js
+++ b/modules/shortcut/shortcut.admin.js
@@ -50,7 +50,7 @@ Drupal.behaviors.shortcutDrag = {
// the tableDrag system. However, the row that swapped with it
// has moved to the "disabled" section, so we need to force its
// status to be disabled and mark it also as changed.
- var changedRowObject = new tableDrag.row(changedRow, 'mouse', self.indentEnabled, self.maxDepth, true);
+ var changedRowObject = new tableDrag.row(changedRow, 'mouse', false, 0, true);
changedRowObject.markChanged();
tableDrag.rowStatusChange(changedRowObject);
}
diff --git a/modules/shortcut/shortcut.module b/modules/shortcut/shortcut.module
index 4c67a1416..71284bb84 100644
--- a/modules/shortcut/shortcut.module
+++ b/modules/shortcut/shortcut.module
@@ -86,7 +86,7 @@ function shortcut_menu() {
'title' => 'Edit shortcuts',
'page callback' => 'drupal_get_form',
'page arguments' => array('shortcut_set_customize', 4),
- 'title callback' => 'shortcut_set_title',
+ 'title callback' => 'shortcut_set_title_callback',
'title arguments' => array(4),
'access callback' => 'shortcut_set_edit_access',
'access arguments' => array(4),
@@ -735,9 +735,15 @@ function shortcut_toolbar_pre_render($toolbar) {
}
/**
- * Returns the title of a shortcut set.
+ * Returns the sanitized title of a shortcut set.
*
- * Title callback for the editing pages for shortcut sets.
+ * Deprecated. This function was previously used as a menu item title callback
+ * but has been replaced by shortcut_set_title_callback() (which does not
+ * sanitize the title, since the menu system does that automatically). In
+ * Drupal 7, use that function for title callbacks, and call check_plain()
+ * directly if you need a sanitized title. In Drupal 8, this function will be
+ * restored as a title callback and therefore will no longer sanitize its
+ * output.
*
* @param $shortcut_set
* An object representing the shortcut set, as returned by
@@ -747,3 +753,15 @@ function shortcut_set_title($shortcut_set) {
return check_plain($shortcut_set->title);
}
+/**
+ * Returns the title of a shortcut set.
+ *
+ * Title callback for the editing pages for shortcut sets.
+ *
+ * @param $shortcut_set
+ * An object representing the shortcut set, as returned by
+ * shortcut_set_load().
+ */
+function shortcut_set_title_callback($shortcut_set) {
+ return $shortcut_set->title;
+}