From cd771f66b261a8ee1f530c4f7440a0e86027672f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 18 Sep 2001 18:34:54 +0000 Subject: [PATCH] - Applied Alexander Schwartz's patches on the Drupal 3.00 branch. --- account.php | 15 ++++++++++----- index.php | 2 +- modules/search.module | 4 ++-- submit.php | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/account.php b/account.php index 316bd1f8348..451800b56bb 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") .": $ban->reason.")); + $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the username '%a' is banned"), array("%a" => $edit[login])) .": $ban->reason.")); } 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") .": $ban->reason.")); + $theme->box(t("Create user account"), account_create_form($edit, strtr(t("the e-mail '%a' is banned"), array("%a" => $edit[email])) .": $ban->reason.")); } 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 63538dec7e0..46f9b36632d 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 7beb1e74c26..bb74db3c2e1 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[] = "search"; + $links[] = "". t("search") .""; } 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 8181a0cfe2f..8741c0b320e 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();