summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcmail.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-07 11:39:36 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-07 11:39:36 +0000
commit687e05e28997d48ccac02b98f81d71e9928fec16 (patch)
tree98fa24244d3c6ab7480f74bb89f42b423ae76937 /roundcubemail/program/include/rcmail.php
parentea3d91249609d60de8ea570b2f7694fc283a175c (diff)
- Deprecate $DB, $USER, $IMAP global variables, Use $RCMAIL instead
git-svn-id: https://svn.roundcube.net/trunk@5564 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
-rw-r--r--roundcubemail/program/include/rcmail.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php
index 9f26450a1..59ffaea89 100644
--- a/roundcubemail/program/include/rcmail.php
+++ b/roundcubemail/program/include/rcmail.php
@@ -159,8 +159,6 @@ class rcmail
/**
* Initial startup function
* to register session, create database and imap connections
- *
- * @todo Remove global vars $DB, $USER
*/
private function startup()
{
@@ -172,7 +170,10 @@ class rcmail
}
// connect to database
- $GLOBALS['DB'] = $this->get_dbh();
+ $this->get_dbh();
+
+ // set global object for backward compatibility
+ $GLOBALS['DB'] = $this->db;
// start session
$this->session_init();
@@ -240,6 +241,8 @@ class rcmail
{
if (is_object($user)) {
$this->user = $user;
+
+ // set global object for backward compatibility
$GLOBALS['USER'] = $this->user;
// overwrite config with user preferences
@@ -320,8 +323,8 @@ class rcmail
return $this->db;
}
-
-
+
+
/**
* Get global handle for memcache access
*