forked from extern/egroupware
added function to generate a function-name backtrace
This commit is contained in:
parent
3f3d0c79e9
commit
cb12c82707
@ -733,13 +733,7 @@
|
|||||||
|
|
||||||
if (!method_exists($GLOBALS[$classname],$functionname))
|
if (!method_exists($GLOBALS[$classname],$functionname))
|
||||||
{
|
{
|
||||||
$module = $_GET['menuaction'] ? $_GET['menuaction'] : str_replace(PHPGW_SERVER_ROOT,'',$_SERVER['SCRIPT_FILENAME']);
|
echo "<p><b>".functin_backtrace()."</b>: no methode '$functionname' in class '$classname'</p>\n";
|
||||||
|
|
||||||
echo "<p><b>$module</b>: no methode '$functionname' in class '$classname'</p>\n";
|
|
||||||
if (function_exists('debug_backtrace'))
|
|
||||||
{
|
|
||||||
echo '<p><b>Debug-backtrace</b><pre style="text-align: left">'.print_r(debug_backtrace(),True).'</pre>';
|
|
||||||
}
|
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if ((is_array($functionparams) || $functionparams != '_UNDEF_') && ($functionparams || $functionparams != 'True'))
|
if ((is_array($functionparams) || $functionparams != '_UNDEF_') && ($functionparams || $functionparams != 'True'))
|
||||||
@ -1119,8 +1113,7 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function function_backtrace
|
@function function_backtrace
|
||||||
@abstract returns the backtrace of the calling functions
|
@abstract backtrace of the calling functions for php4.3+ else menuaction/scriptname
|
||||||
@param $default default to return if the function debug_backtrace is not availible (php<4.3)
|
|
||||||
@author ralfbecker
|
@author ralfbecker
|
||||||
@return function-names separated by slashes (beginning with the calling function not this one)
|
@return function-names separated by slashes (beginning with the calling function not this one)
|
||||||
*/
|
*/
|
||||||
@ -1137,7 +1130,7 @@
|
|||||||
}
|
}
|
||||||
return implode('/',$ret);
|
return implode('/',$ret);
|
||||||
}
|
}
|
||||||
return $default;
|
return $_GET['menuaction'] ? $_GET['menuaction'] : str_replace(PHPGW_SERVER_ROOT,'',$_SERVER['SCRIPT_FILENAME']);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user