phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc functions.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc functions.inc.php
Date: Sat, 01 Apr 2006 08:09:22 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Branch:         
Changes by:     Dave Hall <address@hidden>      06/04/01 08:09:22

Modified files:
        inc            : functions.inc.php 

Log message:
        provide clone() support in php4

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/inc/functions.inc.php.diff?tr1=1.183&tr2=1.184&r1=text&r2=text

Patches:
Index: phpgwapi/inc/functions.inc.php
diff -u phpgwapi/inc/functions.inc.php:1.183 
phpgwapi/inc/functions.inc.php:1.184
--- phpgwapi/inc/functions.inc.php:1.183        Thu Feb 16 04:32:27 2006
+++ phpgwapi/inc/functions.inc.php      Sat Apr  1 08:09:22 2006
@@ -7,10 +7,27 @@
        * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage utilities
-       * @version $Id: functions.inc.php,v 1.183 2006/02/16 04:32:27 skwashd 
Exp $
+       * @version $Id: functions.inc.php,v 1.184 2006/04/01 08:09:22 skwashd 
Exp $
        */
-
-
+       
+       
+       // PHP5 compat fix
+       if (!function_exists('clone'))
+       {
+               eval('
+                       function clone($obj)
+                       {
+                               if ( method_exists($obj, "__clone") )
+                               {
+                                       $new_obj = $obj;
+                                       $new_obj->__clone();
+                                       return $new_obj;
+                               }
+                               return $obj;
+                       }
+               ');
+       }
+       
        
/****************************************************************************\
        * If running in PHP3, then force admin to upgrade                       
     *
        
\****************************************************************************/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]