From b85cf71962c7b0231994131258053916b9ed73cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 19 Apr 2003 16:42:42 +0000 Subject: - Applied modified version of Al's "block delta" patch. I left out the blogroll feature as I think it would get very confusing. I don't mind to add it but it need some thought and documentation as it somewhat conflicts with the existing cloud module. These changes require you to run update.php. --- modules/block.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/block.module') diff --git a/modules/block.module b/modules/block.module index ff8793ef4..38835cabe 100644 --- a/modules/block.module +++ b/modules/block.module @@ -77,7 +77,8 @@ function block_block($op = "list", $delta = 0) { function block_admin_save($edit) { foreach ($edit as $module => $blocks) { foreach ($blocks as $delta => $block) { - db_query("UPDATE blocks SET region = '%s', status = '%d', custom = '%d', path = '%s', weight = '%d' WHERE module = '%s' AND delta = '%d'", $block["region"], $block["status"], $block["custom"], $block["path"], $block["weight"], $module, $delta); + db_query("UPDATE blocks SET region = '%s', status = '%d', custom = '%d', path = '%s', weight = '%d' WHERE module = '%s' AND delta = '%s'", + $block["region"], $block["status"], $block["custom"], $block["path"], $block["weight"], $module, $delta); } } @@ -118,7 +119,8 @@ function _block_rehash($order_by = array("weight")) { } // reinsert blocks into table - db_query("INSERT INTO blocks (module, delta, status, weight, region, path, custom) VALUES ('%s', '%d', '%d', '%d', '%d', '%s', '%d')", $block["module"], $block["delta"], $block["status"], $block["weight"], $block["region"], $block["path"], $block["custom"]); + db_query("INSERT INTO blocks (module, delta, status, weight, region, path, custom) VALUES ('%s', '%s', '%d', '%d', '%d', '%s', '%d')", + $block["module"], $block["delta"], $block["status"], $block["weight"], $block["region"], $block["path"], $block["custom"]); $blocks[] = $block; -- cgit v1.2.3