summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-11-26 16:19:37 +0000
committerDries Buytaert <dries@buytaert.net>2007-11-26 16:19:37 +0000
commit58852d4b7b72113793455b92bf113359e849e2fb (patch)
treefef56281537d84f50d350728d3b56e6c74c89d20 /includes
parenta960d4d618dacb5954eebc48e41517d9eaf536af (diff)
downloadbrdo-58852d4b7b72113793455b92bf113359e849e2fb.tar.gz
brdo-58852d4b7b72113793455b92bf113359e849e2fb.tar.bz2
- Patch #192736 by quicksketch et al: drag and drop for book module.
Diffstat (limited to 'includes')
-rw-r--r--includes/cache.inc4
-rw-r--r--includes/common.inc5
-rw-r--r--includes/menu.inc4
3 files changed, 8 insertions, 5 deletions
diff --git a/includes/cache.inc b/includes/cache.inc
index 140f25e65..521f36f99 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -133,8 +133,8 @@ function cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) {
global $user;
if (!isset($cid) && !isset($table)) {
- // Clear the block cache first, so stale data will
- // not end up in the page cache.
+ // Clear the block cache first, so stale data will
+ // not end up in the page cache.
cache_clear_all(NULL, 'cache_block');
cache_clear_all(NULL, 'cache_page');
return;
diff --git a/includes/common.inc b/includes/common.inc
index 1eb9bae2b..0b91ab5cc 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2028,10 +2028,12 @@ function drupal_get_js($scope = 'header', $javascript = NULL) {
* (optional) The column containing the field elements may be entirely hidden
* from view dynamically when the JavaScript is loaded. Set to FALSE if the
* column should not be hidden.
+ * @param $limit
+ * (optional) Limit the maximum amount of parenting in this table.
* @see block-admin-display-form.tpl.php
* @see theme_menu_overview_form()
*/
-function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgroup = NULL, $source = NULL, $hidden = TRUE) {
+function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgroup = NULL, $source = NULL, $hidden = TRUE, $limit = 0) {
static $js_added = FALSE;
if (!$js_added) {
drupal_add_js('misc/tabledrag.js', 'core');
@@ -2047,6 +2049,7 @@ function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgro
'relationship' => $relationship,
'action' => $action,
'hidden' => $hidden,
+ 'limit' => $limit,
);
drupal_add_js($settings, 'setting');
}
diff --git a/includes/menu.inc b/includes/menu.inc
index dafe7d3f6..b25ad9376 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1788,7 +1788,7 @@ function menu_link_save(&$item) {
function _menu_clear_page_cache() {
static $cache_cleared = 0;
- // Clear the page and block caches, but at most twice, including at
+ // Clear the page and block caches, but at most twice, including at
// the end of the page load when there are multple links saved or deleted.
if (empty($cache_cleared)) {
cache_clear_all();
@@ -1805,7 +1805,7 @@ function _menu_clear_page_cache() {
}
/**
-* Helper function to update a list of menus with expanded items
+* Helper function to update a list of menus with expanded items
*/
function _menu_set_expanded_menus() {
$names = array();