From d6869a66938db760a6b10990f0dbccc81347ffb3 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 24 Sep 2008 06:41:44 -0400
Subject: [PATCH] - Fix language autodetection (#1485401)
---
program/include/rcmail.php | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index e7a0db8..10395b0 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -223,7 +223,7 @@
/**
* Get the current database connection
*
- * @return object rcube_db Database connection object
+ * @return object rcube_mdb2 Database connection object
*/
public function get_dbh()
{
@@ -460,7 +460,7 @@
raise_error(array(
'code' => 600,
'type' => 'php',
- 'file' => "config/main.inc.php",
+ 'file' => RCMAIL_CONFIG_DIR."/main.inc.php",
'message' => "Acces denied for new user $username. 'auto_create_user' is disabled"
), true, false);
}
@@ -728,7 +728,9 @@
if (!$valid || ($_SERVER['REQUEST_METHOD']!='POST' && $now - $_SESSION['auth_time'] > 300)) {
$_SESSION['last_auth'] = $_SESSION['auth_time'];
$_SESSION['auth_time'] = $now;
- setcookie('sessauth', $this->get_auth_hash(session_id(), $now));
+ $cookie = session_get_cookie_params();
+ setcookie('sessauth', $this->get_auth_hash(session_id(), $now), 0, $cookie['path'],
+ $cookie['domain'], $_SERVER['HTTPS'] && ($_SERVER['HTTPS']!='off'));
}
}
else {
@@ -895,6 +897,9 @@
if (!$p['task'] || !in_array($p['task'], rcmail::$main_tasks))
$p['task'] = $this->task;
+ $p['_task'] = $p['task'];
+ unset($p['task']);
+
$url = './';
$delm = '?';
foreach (array_reverse($p) as $par => $val)
--
Gitblit v1.9.1