summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2001-09-18 18:34:54 (GMT)
committer Dries Buytaert2001-09-18 18:34:54 (GMT)
commitcd771f66b261a8ee1f530c4f7440a0e86027672f (patch)
tree3baf3f5337a00ebc22ee798858e8d0524a6c88a1
parentb1b32561a2bce91df217b1ac3cb7cb489ec96ab5 (diff)
- Applied Alexander Schwartz's patches on the Drupal 3.00 branch.
-rw-r--r--account.php15
-rw-r--r--index.php2
-rw-r--r--modules/search.module4
-rw-r--r--submit.php2
4 files changed, 14 insertions, 9 deletions
diff --git a/account.php b/account.php
index 316bd1f..451800b 100644
--- a/account.php
+++ b/account.php
@@ -333,16 +333,16 @@ function account_create_submit($edit) {
$theme->box(t("Create user account"), account_create_form($edit, $error));
}
else if ($ban = user_ban($edit[login], "username")) {
- $theme->box(t("Create user account"), account_create_form($edit, t("the username '$edit[login]' is banned") .": <i>$ban->reason</i>."));
+ $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the username '%a' is banned"), array("%a" => $edit[login])) .": <i>$ban->reason</i>."));
}
else if ($ban = user_ban($edit[real_email], "e-mail address")) {
- $theme->box(t("Create user account"), account_create_form($edit, t("the username '$edit[email]' is banned") .": <i>$ban->reason</i>."));
+ $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the e-mail '%a' is banned"), array("%a" => $edit[email])) .": <i>$ban->reason</i>."));
}
else if (db_num_rows(db_query("SELECT userid FROM users WHERE (LOWER(userid) = LOWER('$edit[login]') OR LOWER(name) = LOWER('$edit[login]'))")) > 0) {
- $theme->box(t("Create user account"), account_create_form($edit, t("the username '$edit[login]' is already taken.")));
+ $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the username '%a' is already taken."), array("%a" => $edit[login]))));
}
else if (db_num_rows(db_query("SELECT real_email FROM users WHERE LOWER(real_email) = LOWER('$edit[email]')")) > 0) {
- $theme->box(t("Create user account"), account_create_form($edit, t("the e-mail address '$edit[email]' is already in use by another account.")));
+ $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the e-mail address '%a' is already in use by another account."),array("%a" => $edit[email]))));
}
else {
@@ -517,7 +517,12 @@ switch ($op) {
break;
case "login":
account_session_start(check_input($userid), check_input($passwd));
- header("Location: account.php?op=info");
+ if($HTTP_REFERER <> "") {
+ header("Location: $HTTP_REFERER");
+ }
+ else {
+ header("Location: account.php?op=info");
+ }
break;
case "logout":
account_session_close();
diff --git a/index.php b/index.php
index 63538de..46f9b36 100644
--- a/index.php
+++ b/index.php
@@ -14,7 +14,7 @@ if (user_access("access content")) {
}
}
else {
- $theme->box("Access denied", message_access());
+ $theme->box(t("Access denied"), message_access());
}
$theme->footer();
diff --git a/modules/search.module b/modules/search.module
index 7beb1e7..bb74db3 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -6,7 +6,7 @@ function search_perm() {
function search_link($type) {
if ($type == "page" && user_access("search content")) {
- $links[] = "<a href=\"module.php?mod=search\">search</a>";
+ $links[] = "<a href=\"module.php?mod=search\">". t("search") ."</a>";
}
return $links ? $links : array();
@@ -49,7 +49,7 @@ function search_page() {
}
else {
$theme->header();
- $theme->box("Access denied", message_access());
+ $theme->box(t("Access denied"), message_access());
$theme->footer();
}
}
diff --git a/submit.php b/submit.php
index 8181a0c..8741c0b 100644
--- a/submit.php
+++ b/submit.php
@@ -24,7 +24,7 @@ if (user_access("post content")) {
}
}
else {
- $theme->box("Submit", message_access());
+ $theme->box(t("Submit"), message_access());
}
$theme->footer();