Improvements to debug_log
This commit is contained in:
@@ -39,7 +39,7 @@ switch ($www['cmd']) {
|
||||
}
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Ready to render page for command [%s,%s].',128,__FILE__,__LINE__,__METHOD__,$www['cmd'],$app['script_cmd']);
|
||||
debug_log('Ready to render page for command [%s,%s].',128,0,__FILE__,__LINE__,__METHOD__,$www['cmd'],$app['script_cmd']);
|
||||
|
||||
# Create page.
|
||||
# Set the index so that we render the right server tree.
|
||||
|
@@ -89,9 +89,8 @@ if ($copy_result) {
|
||||
}
|
||||
|
||||
function r_copy_dn($serverSRC,$serverDST,$snapshottree,$dnSRC,$dnDST,$remove) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s,%s,%s)',1,__FILE__,__LINE__,__METHOD__,
|
||||
$serverSRC->getIndex(),$serverDST->getIndex(),$snapshottree,$dnSRC,$dnDST);
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
$copy_message = array();
|
||||
|
||||
@@ -141,9 +140,8 @@ function r_copy_dn($serverSRC,$serverDST,$snapshottree,$dnSRC,$dnDST,$remove) {
|
||||
}
|
||||
|
||||
function copy_dn($serverSRC,$serverDST,$dnSRC,$dnDST,$remove) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s,%s)',17,__FILE__,__LINE__,__METHOD__,
|
||||
$serverSRC->getIndex(),$serverDST->getIndex(),$dnSRC,$dnDST);
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
$request = array();
|
||||
$request['pageSRC'] = new PageRender($serverSRC->getIndex(),get_request('template','REQUEST',false,'none'));
|
||||
@@ -166,9 +164,8 @@ function copy_dn($serverSRC,$serverDST,$dnSRC,$dnDST,$remove) {
|
||||
}
|
||||
|
||||
function build_tree($server,$dn,$buildtree) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (%s,%s,%s)',1,__FILE__,__LINE__,__METHOD__,
|
||||
$server->getIndex(),$dn,$buildtree);
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
# We search all children, not only the visible children in the tree
|
||||
$children = $server->getContainerContents($dn,null,0);
|
||||
@@ -180,7 +177,7 @@ function build_tree($server,$dn,$buildtree) {
|
||||
}
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Returning (%s)',1,__FILE__,__LINE__,__METHOD__,$buildtree);
|
||||
debug_log('Returning (%s)',1,0,__FILE__,__LINE__,__METHOD__,$buildtree);
|
||||
|
||||
return $buildtree;
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ if (isset($app['server']) && ! is_null($request['container'])) {
|
||||
|
||||
foreach ($app['server']->getBaseDN() as $base) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Comparing BaseDN [%s] with container [%s]',64,__FILE__,__LINE__,__METHOD__,$base,$request['container']);
|
||||
debug_log('Comparing BaseDN [%s] with container [%s]',64,0,__FILE__,__LINE__,__METHOD__,$base,$request['container']);
|
||||
|
||||
if (! pla_compare_dns($request['container'],$base)) {
|
||||
$parent_container = false;
|
||||
|
@@ -165,14 +165,9 @@ function get_line_end_format() {
|
||||
*/
|
||||
function get_user_agent_string() {
|
||||
if (isset($_SERVER['HTTP_USER_AGENT']))
|
||||
$return = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
return strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
else
|
||||
$return = '';
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('Entered with (), Returning (%s)',1,__FILE__,__LINE__,__METHOD__,$return);
|
||||
|
||||
return $return;
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user