From 828ba66500f49571f2007cacee25b18dce74336f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Jun 2003 17:26:27 +0000 Subject: - 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. --- modules/block.module | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'modules/block.module') 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 .= "

". t("Themes with both left and right sidebars") .":

\n"; $output .= "\n"; - $output .= " \n"; + $output .= " \n"; $output .= " \n"; - $output .= " \n"; + $output .= " \n"; $output .= "
header
". t("header") ."
\n". ($lblocks ? $lblocks : " ") ." \n". ($rblocks ? $rblocks : " ") ."
footer
". t("footer") ."
\n"; $result = db_query("SELECT * FROM blocks WHERE status > 0 ORDER BY weight"); @@ -194,16 +194,16 @@ function block_admin_preview() { $output .= "

". t("Themes with right-sidebar only") .":

\n"; $output .= "\n"; - $output .= " \n"; + $output .= " \n"; $output .= " \n"; - $output .= " \n"; + $output .= " \n"; $output .= "
header
". t("header") ."
 \n". ($blocks ? $blocks : " ") ."
footer
". t("footer") ."
\n"; $output .= "

". t("Themes with left-sidebar only") .":

\n"; $output .= "\n"; - $output .= " \n"; + $output .= " \n"; $output .= " \n"; - $output .= " \n"; + $output .= " \n"; $output .= "
header
". t("header") ."
\n". ($blocks ? $blocks : " ") ." 
footer
". t("footer") ."
\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 -- cgit v1.2.3