summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc18
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 &amp; to simply &
+ */
+ $url = str_replace ("&amp;", "&", $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("&amp;", $t) . ($anchor ? "#$anchor" : "");
+ if (count($t)) {
+ return "$script.php?". implode("&amp;", $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"));