[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.123,1.124
From: |
Dan Kuykendall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.123,1.124 |
Date: |
Tue, 12 Feb 2002 05:06:10 -0500 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv30690/phpgwapi/inc
Modified Files:
functions.inc.php
Log Message:
finished multi-dimensional array support for data type debugging
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -r1.123 -r1.124
*** functions.inc.php 12 Feb 2002 09:10:39 -0000 1.123
--- functions.inc.php 12 Feb 2002 10:06:06 -0000 1.124
***************
*** 43,46 ****
--- 43,65 ----
@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;
+ }
/*!
***************
*** 60,66 ****
if (!is_array($var))
{
! if ($var != 'messageonly')
{
! echo "$message is a
".gettype($var)."<br>\n";
}
else
--- 79,92 ----
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
***************
*** 73,79 ****
echo "<pre>\n$message\n";
print_r($var);
! while(list($key, $value) = each($var))
{
! echo 'Array['.$key.'] is a
'.gettype($var[$key])."\n";
}
echo "\n<pre>\n";
--- 99,118 ----
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";
***************
*** 266,270 ****
global $phpgw_info, $phpgw;
! if(is_object(@$GLOBALS['phpgw']->log) && $class !=
'phpgwapi.error' && $class != 'phpgwapi.errorlog')
{
//$GLOBALS['phpgw']->log->write(array('text'=>'D-Debug,
dbg: %1','p1'=>'This class was run:
'.$class,'file'=>__FILE__,'line'=>__LINE__));
--- 305,309 ----
global $phpgw_info, $phpgw;
! if (is_object(@$GLOBALS['phpgw']->log) && $class !=
'phpgwapi.error' && $class != 'phpgwapi.errorlog')
{
//$GLOBALS['phpgw']->log->write(array('text'=>'D-Debug,
dbg: %1','p1'=>'This class was run:
'.$class,'file'=>__FILE__,'line'=>__LINE__));
***************
*** 274,281 ****
list($appname,$classname) = explode(".", $class);
!
if(!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
{
! if(@file_exists(PHPGW_INCLUDE_ROOT . '/' . $appname .
'/inc/class.' . $classname . '.inc.php'))
{
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
--- 313,320 ----
list($appname,$classname) = explode(".", $class);
! if
(!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
{
!
if(@file_exists(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'))
{
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
***************
*** 289,293 ****
if($GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
{
! if($p1 == '_UNDEF_' && $p1 != 1 && $p1 != '0')
{
eval('$obj = new ' . $classname . ';');
--- 328,332 ----
if($GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
{
! if ($p1 == '_UNDEF_' && $p1 != 1)
{
eval('$obj = new ' . $classname . ';');
***************
*** 298,304 ****
$i = 1;
$code = '$obj = new ' . $classname . '(';
! while(list($x,$test) = each($input))
{
! if(($test == '_UNDEF_' && $test != 1 &&
$test != '0') || $i == 17)
{
break;
--- 337,343 ----
$i = 1;
$code = '$obj = new ' . $classname . '(';
! while (list($x,$test) = each($input))
{
! if (($test == '_UNDEF_' && $test != 1 )
|| $i == 17)
{
break;
***************
*** 459,463 ****
function get_account_id($account_id = '',$default_id = '')
{
! if (is_int($account_id))
{
return $account_id;
--- 498,502 ----
function get_account_id($account_id = '',$default_id = '')
{
! if (gettype($account_id) == 'integer')
{
return $account_id;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.123,1.124,
Dan Kuykendall <address@hidden> <=