From 38aaf5f35d8bc51f6792989a1a7732be5a1e7676 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 31 May 2002 20:29:30 +0000 Subject: - Added missing translations and the like. --- includes/common.inc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'includes') 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 .= "Matching ". $name ."s ranked in order of relevance
"; + $output .= "

". t("Matching ". $name ."s ranked in order of relevance") .":

"; } else { - $output .= "Matching ". $name ."s
"; + $output .= "

". t("Matching ". $name ."s") .":

"; } foreach ($result as $entry) { $output .= search_item($entry, $name); @@ -302,6 +302,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 @@ -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[] = "". t("home") .""; + $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")); -- cgit v1.2.3