diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-06-19 17:26:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-06-19 17:26:27 +0000 |
commit | 828ba66500f49571f2007cacee25b18dce74336f (patch) | |
tree | 642334725a56aaffff5d6fe6dba264fa90071226 /modules/block.module | |
parent | 0c5b324809dcb44de8690f7bba21fec607bd67d1 (diff) | |
download | brdo-828ba66500f49571f2007cacee25b18dce74336f.tar.gz brdo-828ba66500f49571f2007cacee25b18dce74336f.tar.bz2 |
- Bugfix: fixed utf-8 problem for people that use PHP 4.2.x or below. Patch #33 by Al.
- Bugfix: fixed translation problems in the user module and the block module. Patch by Stefan.
- Improvement: made it impossible to delete user role #1 and #2. Patch #38 by Al.
- Improvement: fixed the "Allowed HTML tag" issues. Makes for better code and improved usability. Patch #35 by Al.
NOTE: as soon the compose tips make their way into CVS, most of this code can be removed.
Diffstat (limited to 'modules/block.module')
-rw-r--r-- | modules/block.module | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/modules/block.module b/modules/block.module index 39d7e8125..d76731657 100644 --- a/modules/block.module +++ b/modules/block.module @@ -135,7 +135,7 @@ function block_admin_display() { $blocks = _block_rehash(); - $header = array(t("block"), t("enabled"), t("custom"), t("weight"), t("region"), t("path"), array("data" => "operations", "colspan" => 2)); + $header = array(t("block"), t("enabled"), t("custom"), t("weight"), t("region"), t("path"), array("data" => t("operations"), "colspan" => 2)); foreach ($blocks as $block) { if ($block["module"] == "block") { @@ -147,11 +147,11 @@ function block_admin_display() { $delete = ""; } - $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array("left", "right")), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete); + $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete); } $output = table($header, $rows); - $output .= form_submit("Save blocks"); + $output .= form_submit(t("Save blocks")); print form($output); } @@ -178,9 +178,9 @@ function block_admin_preview() { $output .= "<h3>". t("Themes with both left and right sidebars") .":</h3>\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; - $output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">header</td></tr>\n"; + $output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">". t("header") ."</td></tr>\n"; $output .= " <tr><td>\n". ($lblocks ? $lblocks : " ") ."</td><td style=\"width: 300px;\"> </td><td>\n". ($rblocks ? $rblocks : " ") ."</td></tr>\n"; - $output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">footer</td></tr>\n"; + $output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">". t("footer") ."</td></tr>\n"; $output .= "</table>\n"; $result = db_query("SELECT * FROM blocks WHERE status > 0 ORDER BY weight"); @@ -194,16 +194,16 @@ function block_admin_preview() { $output .= "<h3>". t("Themes with right-sidebar only") .":</h3>\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; - $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n"; + $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("header") ."</td></tr>\n"; $output .= " <tr><td style=\"width: 400px;\"> </td><td>\n". ($blocks ? $blocks : " ") ."</td></tr>\n"; - $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n"; + $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("footer") ."</td></tr>\n"; $output .= "</table>\n"; $output .= "<h3>". t("Themes with left-sidebar only") .":</h3>\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; - $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n"; + $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("header") ."</td></tr>\n"; $output .= " <tr><td>\n". ($blocks ? $blocks : " ") ."</td><td style=\"width: 400px;\"> </td></tr>\n"; - $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n"; + $output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("footer") ."</td></tr>\n"; $output .= "</table>\n"; print $output; @@ -216,18 +216,18 @@ function block_box_get($bid) { function block_box_form($edit = array()) { $type = array(0 => "HTML", 1 => "PHP"); - $form = form_textfield("Title", "title", $edit["title"], 50, 64); - $form .= form_textfield("Description", "info", $edit["info"], 50, 64); - $form .= form_textarea("Body", "body", $edit["body"], 70, 10); + $form = form_textfield(t("Title"), "title", $edit["title"], 50, 64); + $form .= form_textfield(t("Description"), "info", $edit["info"], 50, 64); + $form .= form_textarea(t("Body"), "body", $edit["body"], 70, 10); if (user_access("create php content")) { - $form .= form_select("Type", "type", $edit["type"], $type); + $form .= form_select(t("Type"), "type", $edit["type"], $type); } if ($edit["bid"]) { $form .= form_hidden("bid", $edit["bid"]); } - $form .= form_submit("Save block"); + $form .= form_submit(t("Save block")); print form($form); } @@ -279,12 +279,12 @@ function block_admin() { cache_clear_all(); block_admin_display(); break; - case "Save block": + case t("Save block"): print status(block_box_save($edit)); cache_clear_all(); block_admin_display(); break; - case "Save blocks": + case t("Save blocks"): print status(block_admin_save($edit)); cache_clear_all(); // fall through @@ -330,4 +330,4 @@ function block_user($type, &$edit, &$user) { } } -?> +?>
\ No newline at end of file |