From ec9361225a4665be3a105f5b450bbc0033a9c9eb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 20 Oct 2004 09:03:18 +0000 Subject: [PATCH] added clone function for php4, use as $db = clone($this->db); --- phpgwapi/inc/common_functions.inc.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index 140b95e39f..400be9ec32 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -890,9 +890,7 @@ { if(floor(phpversion()) > 4) { -// $b = $a->__clone(); -// $b = clone $a; - $b = $a; + $b = clone($a); } else { @@ -1239,4 +1237,15 @@ _check_script_tag($GLOBALS[$where],$where); } } + + if(floor(phpversion()) <= 4) + { + /** + * clone function for php4, use as $new_obj = clone($old_obj); + */ + function clone($obj) + { + return $obj; + } + } ?>