phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.4,1.121.2


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.4,1.121.2.5
Date: Tue, 12 Feb 2002 16:19:38 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv7707/phpgwapi/inc

Modified Files:
      Tag: Version-0_9_14-branch
        functions.inc.php 
Log Message:
rolling back my updated print_debug(). I shouldnt have added a new feature

Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.121.2.4
retrieving revision 1.121.2.5
diff -C2 -r1.121.2.4 -r1.121.2.5
*** functions.inc.php   12 Feb 2002 10:09:25 -0000      1.121.2.4
--- functions.inc.php   12 Feb 2002 21:19:34 -0000      1.121.2.5
***************
*** 43,125 ****
         @abstract Direct functions, which are not part of the API class 
because they are require to be availble at the lowest level.
        */
-       /*!
-        @function print_debug_subarray
-        @abstract Not to be used directly. Should only be used by print_debug()
-       */
-       function print_debug_subarray($array)
-       {
-               while(list($key, $value) = each($array))
-               {
-                       if (is_array($value))
-                       {
-                               $vartypes[$key] = print_debug_subarray($value);
-                       }
-                       else
-                       {
-                               $vartypes[$key] = gettype($value);
-                       }
-               }
-               return $vartypes;
-       }
  
        /*!
         @function print_debug
         @abstract print debug data only when debugging mode is turned on.
!        @author seek3r
         @discussion This function is used to debugging data. 
!        @syntax print_debug('message', $somevar);
!        @example print_debug('this is some debugging data',$somevar);
        */
!       function print_debug($message,$var = 'messageonly',$part = 'app', 
$level = 3)
        {
!               if (($part == 'app' && DEBUG_APP == True) || ($part == 'api' && 
DEBUG_API == True))
                {
!                       if ($level >= DEBUG_LEVEL)
!                       {
!                               if (!is_array($var))
!                               {
!                                       if ($var != 'messageonly')
!                                       {
!                                               if (!DEBUG_DATATYPES)
!                                               {
!                                                       echo 
"$message\n$var<br>\n";
!                                               }
!                                               else
!                                               {
!                                                       echo "$message\n$var is 
a ".gettype($var)."<br>\n";
!                                               }
!                                       }
!                                       else
!                                       {
!                                               echo "$message<br>\n";
!                                       }
!                               }
!                               else
!                               {
!                                       echo "<pre>\n$message\n";
!                                       print_r($var);
!                                       if (DEBUG_DATATYPES)
!                                       {
!                                               while(list($key, $value) = 
each($var))
!                                               {
!                                                       //echo 'Array['.$key.'] 
is a '.gettype($var[$key])."\n";
!                                                       if (is_array($value))
!                                                       {
!                                                               $vartypes[$key] 
= print_debug_subarray($value);
!                                                       }
!                                                       else
!                                                       {
!                                                               $vartypes[$key] 
= gettype($value);
!                                                       }
!                                               }
!                                               echo "Data Types:\n";
!                                               print_r($vartypes);
!                                       }
!                                       echo "\n<pre>\n";
!                               }
!                       }
                }
        }
!       
        /*!
         @function sanitize
--- 43,64 ----
         @abstract Direct functions, which are not part of the API class 
because they are require to be availble at the lowest level.
        */
  
        /*!
         @function print_debug
         @abstract print debug data only when debugging mode is turned on.
!        @author jengo
         @discussion This function is used to debugging data. 
!        @syntax print_debug('message');
!        @example print_debug('this is some debugging data');
        */
!       function print_debug($text='')
        {
!               //if (isset($GLOBALS['debugme']) && $GLOBALS['debugme'] == 'on')
!               if (defined(DEBUG_APP) && DEBUG_APP == True)
                {
!                       echo "debug: $text <br>\n";
                }
        }
! 
        /*!
         @function sanitize




reply via email to

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