summaryrefslogtreecommitdiff
path: root/modules/block.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-11 16:21:48 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-11 16:21:48 +0000
commit86552cb4b6a83dc218ea0164ddb7c9670f224ddb (patch)
tree65d981eb5f2d5704e6decedef514fcf083361cc7 /modules/block.module
parentc72bf4b5f79297eff699bd6207f0acdb3bfc4e30 (diff)
downloadbrdo-86552cb4b6a83dc218ea0164ddb7c9670f224ddb.tar.gz
brdo-86552cb4b6a83dc218ea0164ddb7c9670f224ddb.tar.bz2
- changed block, module and theme config pages to use checkboxes.
- coding style clean ups. - fixed taxonomy causing errors.
Diffstat (limited to 'modules/block.module')
-rw-r--r--modules/block.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/block.module b/modules/block.module
index 60ea18e96..b74d2c2a1 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -61,7 +61,7 @@ function block_block() {
}
function block_admin_save($edit) {
- foreach ($edit as $key=>$value) {
+ foreach ($edit as $key => $value) {
db_query("UPDATE blocks SET region = '%s', status = '%d', custom = '%d', path = '%s', weight = '%d' WHERE name = '%s'", $value["region"], $value["status"], $value["custom"], $value["path"], $value["weight"], $key);
}
}
@@ -71,7 +71,7 @@ function block_admin_display() {
// Generate output:
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
- $output .= "<tr><th>block</th><th>module</th><th>status</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
+ $output .= "<tr><th>block</th><th>module</th><th>enabled</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
while ($block = db_fetch_object($result)) {
$weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
@@ -80,8 +80,8 @@ function block_admin_display() {
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'</td>';
$output .= "<td>$block->name</td>";
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "Administer module") : $block->module) .'</td>';
- $output .= '<td>'. form_select(NULL, "$block->name][status", $block->status, array("disabled", "enabled")) .'</td>';
- $output .= '<td>'. form_select(NULL, "$block->name][custom", $block->custom, array("disabled", "enabled")) .'</td>';
+ $output .= '<td align="center">'. form_checkbox(NULL, "$block->name][status", 1, $block->status) .'</td>';
+ $output .= '<td align="center">'. form_checkbox(NULL, "$block->name][custom", 1, $block->custom) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][weight", $block->weight, $weights) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][region", $block->region, array("left", "right")) .'</td>';
$output .= '<td>'. form_textfield(NULL, "$block->name][path", $block->path, 10, 255) .'</td>';