summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-07-03 19:09:51 +0000
committerDries Buytaert <dries@buytaert.net>2001-07-03 19:09:51 +0000
commit6a21940c762cce2b777a2fe9102c675e7db9f6e2 (patch)
tree22548fe34e4ae3794ce9c5ec9be3ecb887ec2751 /includes/common.inc
parent712e38a852844efc5f553fe176aca77f05baa864 (diff)
downloadbrdo-6a21940c762cce2b777a2fe9102c675e7db9f6e2.tar.gz
brdo-6a21940c762cce2b777a2fe9102c675e7db9f6e2.tar.bz2
- common.inc:
+ Made '$na' translatable on popular demand. - node.module: + replaced a confusing configuration description, as suggested by Remco. - statistics.module: + Added a 'most recent referers'-table sorted by timestamp. - drupal.module: + Small update of the links.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc15
1 files changed, 7 insertions, 8 deletions
diff --git a/includes/common.inc b/includes/common.inc
index c8549b0f3..86c24c1b4 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1,7 +1,5 @@
<?
-$na = "<I>na</I>";
-
function conf_init() {
global $HTTP_HOST, $REQUEST_URI;
$file = strtolower(strtr($HTTP_HOST ."". substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")), "/:", ".."));
@@ -49,6 +47,10 @@ function message_access() {
return t("You are not authorized to access to this page.");
}
+function message_na() {
+ return t("n/a");
+}
+
function message_throttle() {
return t("You exceeded the submission rate exceeded. Please wait a few minutes and try again.");
}
@@ -79,8 +81,7 @@ function check_input($text) {
}
function check_output($text, $nl2br = 0) {
- global $na;
- return ($text) ? ($nl2br ? nl2br(stripslashes($text)) : stripslashes($text)) : $na;
+ return ($text) ? ($nl2br ? nl2br(stripslashes($text)) : stripslashes($text)) : message_na();
}
function format_plural($count, $singular, $plural) {
@@ -168,14 +169,12 @@ function format_username($username) {
}
function format_email($address) {
- global $na;
- return ($address) ? "<a href=\"mailto:$address\">$address</A>" : $na;
+ return ($address) ? "<a href=\"mailto:$address\">$address</A>" : message_na();
}
function format_url($address, $description = "") {
- global $na;
$description = ($description) ? $description : $address;
- return ($address) ? "<a href=\"$address\">". check_output($description) ."</a>" : $na;
+ return ($address) ? "<a href=\"$address\">". check_output($description) ."</a>" : message_na();
}
function format_tag($link, $text) {