summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-03-07 22:11:44 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-03-07 22:11:44 +0000
commit831ee213032623aefb9d40cc0ebb97234e56fa63 (patch)
tree1fc05827a5fd28106c8ee001eb61f89ddcd39ee1 /includes/common.inc
parent3aba0fda70b825a588d20d6f9797acab9418c436 (diff)
downloadbrdo-831ee213032623aefb9d40cc0ebb97234e56fa63.tar.gz
brdo-831ee213032623aefb9d40cc0ebb97234e56fa63.tar.bz2
- Renamed "form.admin" to "form admin".
- Added node_admin_settings() to let users set node defaults. * Added _nodeapi("conf") - Modified form_checkbox() to unset options. (Modified the patch from Ax.) - Removed the _save() hook. - Fixed a logical flaw in field_get() and field_set() which would break moderation. - Moved some admin menus around and cleaned up some typos.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 7a79b2895..bbf191cb9 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -723,7 +723,7 @@ function form_item($title, $value, $description = 0) {
}
function form_checkbox($title, $name, $value = 1, $checked = 0, $description = 0) {
- return form_item(0, "<input type=\"checkbox\" name=\"edit[$name]\" value=\"". $value ."\"". ($checked ? " checked=\"checked\"" : "") ." /> $title", $description);
+ return form_hidden($name, 0) . form_item(0, "<input type=\"checkbox\" name=\"edit[$name]\" value=\"". $value ."\"". ($checked ? " checked=\"checked\"" : "") ." /> $title", $description);
}
function form_textfield($title, $name, $value, $size, $maxlength, $description = 0) {
@@ -819,7 +819,7 @@ function l($text, $url, $attributes = array(), $query = NULL) {
}
function field_get($string, $name) {
- ereg(",$name=([^,]+)", ", $string", $regs);
+ ereg(",?$name=([^,]+)", ", $string", $regs);
return $regs[1];
}
@@ -839,7 +839,7 @@ function link_page() {
}
else {
$links = module_invoke_all("link", "page");
- array_unshift($links, "<a href=\"$base_url\" title=\"". t("Return to the main page.") ."\">". t("home") ."</a>");
+ array_unshift($links, "<a href=\"$base_url/\" title=\"". t("Return to the main page.") ."\">". t("home") ."</a>");
return $links;
}
}