diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-05-31 20:29:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-05-31 20:29:30 +0000 |
commit | 38aaf5f35d8bc51f6792989a1a7732be5a1e7676 (patch) | |
tree | c782e563cf5862f5b03c066fd34171a7d2128f71 /includes/common.inc | |
parent | b0ea30ed85b9e737bc6b3c7c5b7ec6ffe73c7803 (diff) | |
download | brdo-38aaf5f35d8bc51f6792989a1a7732be5a1e7676.tar.gz brdo-38aaf5f35d8bc51f6792989a1a7732be5a1e7676.tar.bz2 |
- Added missing translations and the like.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index 1634d641b..2307983d7 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -261,10 +261,10 @@ function search_data() { foreach (module_list() as $name) { if (module_hook($name, "search") && (!$edit["type"] || $edit["type"][$name]) && ($result = module_invoke($name, "search", check_query($keys)))) { if ($name == "node" || $name == "comment") { - $output .= "<b>Matching ". $name ."s ranked in order of relevance</b><br />"; + $output .= "<p><b>". t("Matching ". $name ."s ranked in order of relevance") .":</b></p>"; } else { - $output .= "<b>Matching ". $name ."s</b><br />"; + $output .= "<p><b>". t("Matching ". $name ."s") .":</b></p>"; } foreach ($result as $entry) { $output .= search_item($entry, $name); @@ -303,6 +303,11 @@ function search_type($type = 0, $action = 0, $query = 0, $options = 0) { function drupal_goto($url) { /* + ** Translate & to simply & + */ + $url = str_replace ("&", "&", $url); + + /* ** It is advised to use "drupal_goto()" instead of PHP's "header()" as ** "drupal_goto()" will append the user's session ID to the URI when PHP ** is compiled with "--enable-trans-sid". @@ -624,7 +629,12 @@ function drupal_url($args = array(), $script = "node", $anchor = 0) { foreach ($args as $key => $value) { $t[] = "$key=". urlencode($value); } - return "$script.php?". implode("&", $t) . ($anchor ? "#$anchor" : ""); + if (count($t)) { + return "$script.php?". implode("&", $t) . ($anchor ? "#$anchor" : ""); + } + else { + return "$script.php". ($anchor ? "#$anchor" : ""); + } } /** @@ -683,7 +693,7 @@ function link_page() { return $custom_links; } else { - $links[] = "<a href=\"index.php\">". t("home") ."</a>"; + $links[] = l(t("home"), array(), "index", "", array("title" => t("Return to the main page."))); foreach (module_list() as $name) { if (module_hook($name, "link")) { $links = array_merge($links, module_invoke($name, "link", "page")); |