diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block.module | 34 | ||||
-rw-r--r-- | modules/block/block.module | 34 | ||||
-rw-r--r-- | modules/blog.module | 2 | ||||
-rw-r--r-- | modules/blog/blog.module | 2 | ||||
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/comment.module | 4 | ||||
-rw-r--r-- | modules/comment/comment.module | 4 | ||||
-rw-r--r-- | modules/story.module | 3 | ||||
-rw-r--r-- | modules/story/story.module | 3 | ||||
-rw-r--r-- | modules/user.module | 9 | ||||
-rw-r--r-- | modules/user/user.module | 9 |
12 files changed, 58 insertions, 50 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 diff --git a/modules/block/block.module b/modules/block/block.module index 39d7e8125..d76731657 100644 --- a/modules/block/block.module +++ b/modules/block/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 diff --git a/modules/blog.module b/modules/blog.module index 571bc96fa..e360431c1 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -173,7 +173,7 @@ function blog_form(&$node, &$help, &$error) { if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("blog", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); return $output; } diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 571bc96fa..e360431c1 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -173,7 +173,7 @@ function blog_form(&$node, &$help, &$error) { if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("blog", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); return $output; } diff --git a/modules/book.module b/modules/book.module index fef661c9c..0521ca168 100644 --- a/modules/book.module +++ b/modules/book.module @@ -169,7 +169,7 @@ function book_form(&$node, &$help, &$error) { $output .= implode("", taxonomy_node_form("book", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, form_allowed_tags_text()); $output .= form_textarea(t("Log message"), "log", $node->log, 60, 5, t("An explanation of the additions or updates being made to help the group understand your motivations.")); if (user_access("administer nodes")) { diff --git a/modules/book/book.module b/modules/book/book.module index fef661c9c..0521ca168 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -169,7 +169,7 @@ function book_form(&$node, &$help, &$error) { $output .= implode("", taxonomy_node_form("book", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, form_allowed_tags_text()); $output .= form_textarea(t("Log message"), "log", $node->log, 60, 5, t("An explanation of the additions or updates being made to help the group understand your motivations.")); if (user_access("administer nodes")) { diff --git a/modules/comment.module b/modules/comment.module index 8e4221cba..7b6c703f0 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -112,7 +112,7 @@ function comment_user($type, $edit, &$user) { break; case "edit_form": // when user tries to edit his own data - return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); + return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". form_allowed_tags_text()); case "edit_validate": // validate user data editing return array("signature" => $edit["signature"]); @@ -149,7 +149,7 @@ function comment_form($edit) { $form .= form_textfield(t("Subject"), "subject", $edit["subject"], 50, 64); // comment field: - $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); + $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, form_allowed_tags_text()); // preview button: $form .= form_hidden("cid", $edit["cid"]); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8e4221cba..7b6c703f0 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -112,7 +112,7 @@ function comment_user($type, $edit, &$user) { break; case "edit_form": // when user tries to edit his own data - return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); + return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". form_allowed_tags_text()); case "edit_validate": // validate user data editing return array("signature" => $edit["signature"]); @@ -149,7 +149,7 @@ function comment_form($edit) { $form .= form_textfield(t("Subject"), "subject", $edit["subject"], 50, 64); // comment field: - $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); + $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, form_allowed_tags_text()); // preview button: $form .= form_hidden("cid", $edit["cid"]); diff --git a/modules/story.module b/modules/story.module index 9d80e73ad..8434646ad 100644 --- a/modules/story.module +++ b/modules/story.module @@ -76,8 +76,7 @@ function story_form(&$node, &$help, &$error) { if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("story", $node)); } - - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); return $output; } diff --git a/modules/story/story.module b/modules/story/story.module index 9d80e73ad..8434646ad 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -76,8 +76,7 @@ function story_form(&$node, &$help, &$error) { if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("story", $node)); } - - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); return $output; } diff --git a/modules/user.module b/modules/user.module index 2bb0a2292..97568191e 100644 --- a/modules/user.module +++ b/modules/user.module @@ -318,7 +318,7 @@ function user_block($op = "list", $delta = 0) { $edit = $_POST["edit"]; if ($op == "list") { - $blocks[0]["info"] = t("Log in"); + $blocks[0]["info"] = t("User login"); $blocks[1]["info"] = t("User information"); $blocks[2]["info"] = t("Who's new"); @@ -1444,7 +1444,12 @@ function user_admin_role($edit = array()) { $header = array(t("name"), t("operations")); while ($role = db_fetch_object($result)) { - $rows[] = array($role->name, array("data" => l(t("edit role"), "admin/user/role/$role->rid"), "align" => "center")); + if ($role->name != "anonymous user" && $role->name != "authenticated user") { + $rows[] = array($role->name, array("data" => l(t("edit role"), "admin/user/role/$role->rid"), "align" => "center")); + } + else { + $rows[] = array($role->name, array("data" => "<span class=\"disabled\">". t("locked") ."</span>", "align" => "center")); + } } $rows[] = array("<input type=\"text\" size=\"32\" maxlength=\"64\" name=\"edit[name]\" />", "<input type=\"submit\" name=\"op\" value=\"". t("Add role") ."\" />"); diff --git a/modules/user/user.module b/modules/user/user.module index 2bb0a2292..97568191e 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -318,7 +318,7 @@ function user_block($op = "list", $delta = 0) { $edit = $_POST["edit"]; if ($op == "list") { - $blocks[0]["info"] = t("Log in"); + $blocks[0]["info"] = t("User login"); $blocks[1]["info"] = t("User information"); $blocks[2]["info"] = t("Who's new"); @@ -1444,7 +1444,12 @@ function user_admin_role($edit = array()) { $header = array(t("name"), t("operations")); while ($role = db_fetch_object($result)) { - $rows[] = array($role->name, array("data" => l(t("edit role"), "admin/user/role/$role->rid"), "align" => "center")); + if ($role->name != "anonymous user" && $role->name != "authenticated user") { + $rows[] = array($role->name, array("data" => l(t("edit role"), "admin/user/role/$role->rid"), "align" => "center")); + } + else { + $rows[] = array($role->name, array("data" => "<span class=\"disabled\">". t("locked") ."</span>", "align" => "center")); + } } $rows[] = array("<input type=\"text\" size=\"32\" maxlength=\"64\" name=\"edit[name]\" />", "<input type=\"submit\" name=\"op\" value=\"". t("Add role") ."\" />"); |