From cae3ea743a1a1c96a4e679e2378c758500cd233e Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 30 Oct 2009 13:23:44 +0000 Subject: [PATCH] Fixed non-default company selection bug on login. --- CHANGELOG.txt | 6 ++++++ includes/session.inc | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9e9e571d..634cd0aa 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,12 @@ Legend: ! -> Note $ -> Affected files +30-Oct-2009 Janusz Dobrowolski +# Fixed non-default company selection bug on login. +$ /includes/session.inc +! Code cleanup. +$ /includes/db/connect_db.inc + 30-Oct-2009 Joe Hunt ! Changed name on folder for global help url to fawiki. $ config.default.php diff --git a/includes/session.inc b/includes/session.inc index f449407d..8f780caa 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -206,8 +206,6 @@ set_error_handler('error_handler' /*, errtypes */); if (!isset($_SESSION["wa_current_user"])) $_SESSION["wa_current_user"] = new current_user(); -set_global_connection(); - // logout.php is the only page we should have always // accessable regardless of access level and current login status. if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ @@ -243,7 +241,8 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ $lang = &$_SESSION['language']; $lang->set_language($_SESSION['language']->code); } - } + } else + set_global_connection(); if (!$_SESSION["wa_current_user"]->old_db) include_once($path_to_root . '/company/'.user_company().'/installed_extensions.php'); @@ -253,6 +252,8 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ $_SESSION["App"]->init(); } } + + // POST vars cleanup needed for direct reuse. // We quote all values later with db_escape() before db update. $_POST = strip_quotes($_POST); -- 2.30.2