From 65b9f91744bc5b023e6ec87ad1328692cdfcc5cd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 22 Mar 2006 06:58:49 +0000 Subject: [PATCH] cloning the DB-object, maybe that fixes some of the problems the people on the list have with VFS2 and PHP5 --- phpgwapi/inc/class.vfs_customfields.inc.php | 2 +- phpgwapi/inc/class.vfs_mimetypes.inc.php | 2 +- phpgwapi/inc/class.vfs_prefixes.inc.php | 2 +- phpgwapi/inc/class.vfs_sharing.inc.php | 2 +- phpgwapi/inc/class.vfs_sql2.inc.php | 2 +- phpgwapi/inc/class.vfs_versionsystem.inc.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/phpgwapi/inc/class.vfs_customfields.inc.php b/phpgwapi/inc/class.vfs_customfields.inc.php index cb3ff784c1..af12d246e6 100644 --- a/phpgwapi/inc/class.vfs_customfields.inc.php +++ b/phpgwapi/inc/class.vfs_customfields.inc.php @@ -20,7 +20,7 @@ function vfs_customfields() { - $this->db = $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); } diff --git a/phpgwapi/inc/class.vfs_mimetypes.inc.php b/phpgwapi/inc/class.vfs_mimetypes.inc.php index 9adee4884d..f35224ada0 100644 --- a/phpgwapi/inc/class.vfs_mimetypes.inc.php +++ b/phpgwapi/inc/class.vfs_mimetypes.inc.php @@ -37,7 +37,7 @@ $this->default_filetype_icon = PHPGW_INCLUDE_ROOT.'/filescenter/icons/default.gif'; - $this->db = $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); } diff --git a/phpgwapi/inc/class.vfs_prefixes.inc.php b/phpgwapi/inc/class.vfs_prefixes.inc.php index 35ac692533..c88827a353 100644 --- a/phpgwapi/inc/class.vfs_prefixes.inc.php +++ b/phpgwapi/inc/class.vfs_prefixes.inc.php @@ -33,7 +33,7 @@ function vfs_prefixes() { - $this->db = $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); } /*! diff --git a/phpgwapi/inc/class.vfs_sharing.inc.php b/phpgwapi/inc/class.vfs_sharing.inc.php index b5420024fd..aac5c51506 100644 --- a/phpgwapi/inc/class.vfs_sharing.inc.php +++ b/phpgwapi/inc/class.vfs_sharing.inc.php @@ -32,7 +32,7 @@ function vfs_sharing() { $this->accounts =& $GLOBALS['phpgw']->accounts; - $this->db = $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); } /*! diff --git a/phpgwapi/inc/class.vfs_sql2.inc.php b/phpgwapi/inc/class.vfs_sql2.inc.php index 49875bb625..ebd9dc8fdc 100644 --- a/phpgwapi/inc/class.vfs_sql2.inc.php +++ b/phpgwapi/inc/class.vfs_sql2.inc.php @@ -112,7 +112,7 @@ $GLOBALS['phpgw']->common->phpgw_exit(); } - $this->db =& $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); $this->db_hl =& $GLOBALS['phpgw']->db_hl; $this->vfs_shared (); diff --git a/phpgwapi/inc/class.vfs_versionsystem.inc.php b/phpgwapi/inc/class.vfs_versionsystem.inc.php index a36ce15fea..4e17193fb2 100644 --- a/phpgwapi/inc/class.vfs_versionsystem.inc.php +++ b/phpgwapi/inc/class.vfs_versionsystem.inc.php @@ -97,7 +97,7 @@ } $this->snapshotted_files = array(); - $this->db =& $GLOBALS['phpgw']->db; + $this->db =& clone($GLOBALS['phpgw']->db); $this->now = date('Y-m-d H:i:s'); $this->account_id = $GLOBALS['phpgw_info']['user']['account_id']; $this->tmp_dir = $GLOBALS['phpgw_info']['server']['temp_dir'];