From c5cd575b44fd53b9720c3e0b427ba8880d4f8c2c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 8 Feb 2005 17:58:25 +0000 Subject: [PATCH] using clone() to create copies of the db-object for php5 compatibility --- infolog/inc/class.soinfolog.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index 334b1d60f7..b44a68f288 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -23,7 +23,7 @@ */ class soinfolog // DB-Layer { - var $db,$db2; + var $db; var $grants; var $data = array( ); var $user; @@ -34,7 +34,7 @@ */ function soinfolog( $info_id = 0) { - $this->db = $GLOBALS['phpgw']->db; + $this->db = clone($GLOBALS['phpgw']->db); $this->grants = $GLOBALS['phpgw']->acl->get_grants('infolog'); $this->user = $GLOBALS['phpgw_info']['user']['account_id']; @@ -310,7 +310,7 @@ // delete children, if they are owned by the user if ($delete_children) { - $db2 = $this->db; // we need an extra result-set + $db2 = clone($this->db); // we need an extra result-set $db2->query("SELECT info_id FROM phpgw_infolog WHERE info_id_parent=$info_id AND info_owner=$this->user",__LINE__,__FILE__); while ($db2->next_record()) { @@ -334,7 +334,7 @@ $owner = intval($owner); if (!($new_owner = intval($new_owner))) { - $db2 = $this->db; // we need an extra result-set + $db2 = clone($this->db); // we need an extra result-set $db2->query("SELECT info_id FROM phpgw_infolog WHERE info_owner=$owner",__LINE__,__FILE__); while($db2->next_record()) {