From 3f14fd77bf28a41266e34ec1ca900311ae1ed06b Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Thu, 2 May 2002 19:55:22 +0000 Subject: - small update .htaccess, fixed the blog link. - some interface changes in block admin page. --- modules/block.module | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'modules/block.module') diff --git a/modules/block.module b/modules/block.module index 011c777d8..85d8413f4 100644 --- a/modules/block.module +++ b/modules/block.module @@ -71,12 +71,10 @@ function block_admin_display() { // Generate output: $output = "\n"; - $output .= "\n"; + $output .= "\n"; while ($block = db_fetch_object($result)) { - for ($count = 0; $count < 10; $count++) { - $weights[$count] = $count; - } + $weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $output .= ''; //$output .= ''; @@ -177,18 +175,23 @@ function block_box_form($edit = array()) { function block_box_save($edit) { if ($edit["bid"]) { db_query("UPDATE boxes SET title = '%s', body = '%s', info = '%s', type = '%s' WHERE bid = '%s'", $edit["title"], $edit["body"], $edit["info"], $edit["type"], $edit["bid"]); - return "Block updated."; + return "block updated."; } else { db_query("INSERT INTO boxes (title, body, info, type) VALUES ('%s', '%s', '%s', '%s')", $edit["title"], $edit["body"], $edit["info"], $edit["type"]); - return "Block added."; + if (db_error()) { + return "block added."; + } + else { + return "failed to add block."; + } } } function block_box_delete($bid) { if ($bid) { db_query("DELETE FROM boxes WHERE bid = '%s'", $bid); - return "Block deleted."; + return "block deleted."; } } -- cgit v1.2.3
blockmodulestatuscustomweightregionpath
blockmodulestatuscustomweightregionpathoperations
'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'