summaryrefslogtreecommitdiff
path: root/modules/block.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-19 16:42:42 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-19 16:42:42 +0000
commitb85cf71962c7b0231994131258053916b9ed73cb (patch)
treeac930515eab2f42e297acfa7d4510e18fe824b13 /modules/block.module
parent6bc00ed3b34437ff13c8252775f7f71d26fb0424 (diff)
downloadbrdo-b85cf71962c7b0231994131258053916b9ed73cb.tar.gz
brdo-b85cf71962c7b0231994131258053916b9ed73cb.tar.bz2
- 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.
Diffstat (limited to 'modules/block.module')
-rw-r--r--modules/block.module6
1 files changed, 4 insertions, 2 deletions
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;