X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Flogin.php;h=6e2119b18387dc5661d358aecbd22af37d41e4cc;hb=6a109962730487f0fcd33d55280f7da00c6f02a8;hp=ad71c775aa502a8f8be5872e299e6dc50ab3fa83;hpb=1899535fbf952e57e08d3aadbf649a03932de93c;p=squirrelmail.git diff --git a/src/login.php b/src/login.php index ad71c775..6e2119b1 100644 --- a/src/login.php +++ b/src/login.php @@ -19,29 +19,9 @@ if (!isset($plugin_php)) include("../functions/plugin.php"); - // let's check to see if they compiled with gettext support - if (!function_exists("_")) { - function _($string) { - return $string; - } - } else { - // $squirrelmail_language is set by a cookie when the user selects - // language and logs out - - // Use HTTP content language negotiation if cookie not set - if (!isset($squirrelmail_language) && isset($HTTP_ACCEPT_LANGUAGE)) { - $squirrelmail_language = substr($HTTP_ACCEPT_LANGUAGE, 0, 2); - } - - if (isset($squirrelmail_language)) { - if ($squirrelmail_language != "en" && $squirrelmail_language != "") { - putenv("LC_ALL=".$squirrelmail_language); - bindtextdomain("squirrelmail", "../locale/"); - textdomain("squirrelmail"); - header ("Content-Type: text/html; charset=".$languages[$squirrelmail_language]["CHARSET"]); - } - } - } + // $squirrelmail_language is set by a cookie when the user selects + // language and logs out + set_up_language($squirrelmail_language, true); // Need the base URI to set the cookies. (Same code as in webmail.php) ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs); @@ -53,14 +33,15 @@ // In case the last session was not terminated properly, make sure // we get a new one. - setcookie("PHPSESSID", "", 0, $base_uri); + $cookie_params = session_get_cookie_params(); + setcookie(session_name(),"",0,$cookie_params["domain"].$cookie_params["path"]); echo ""; echo ""; echo $org_name . " - " . _("Login"); echo "\n"; echo "\n"; - echo "
\n"; + echo "\n"; $username_form_name = 'username'; $password_form_name = 'secretkey';