Index: trunk/kernel/action.php =================================================================== diff -u -r837 -r842 --- trunk/kernel/action.php (.../action.php) (revision 837) +++ trunk/kernel/action.php (.../action.php) (revision 842) @@ -2,42 +2,47 @@ $ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY"); -$AdminLogin = admin_login(); -if( defined('DEBUG_ACTIONS') && (DEBUG_ACTIONS & KERNEL_ACTIONS) == KERNEL_ACTIONS && $AdminLogin ) +// ====== Debugger related: begin ====== +$script = basename($_SERVER['PATH_TRANSLATED']); +$skipDebug = Array('index.php','tree.php','head.php','credits.php'); +if( admin_login() && !in_array($script, $skipDebug) ) { - if($Action) $debugger->appendHTML('Kernel Action: '.$Action.''); -} - -if( defined('DEBUG_ACTIONS') && (DEBUG_ACTIONS & SHOW_REQUEST) == SHOW_REQUEST && $AdminLogin ) -{ - // don't show debug output in tree & header of admin & while logging in - $script = basename($_SERVER['PATH_TRANSLATED']); - $skip_debug = Array('index.php','tree.php','head.php','credits.php'); - if( !in_array($script, $skip_debug) ) + if( defined('DEBUG_ACTIONS') ) { - $debugger->appendHTML('ScriptName: '.$debugger->getFileLink($_SERVER['PATH_TRANSLATED'],1,$script).' ('.dirname($_SERVER['PHP_SELF']).')'); - $requestTable = ' - '; - - foreach($_REQUEST as $key => $value) + if( (DEBUG_ACTIONS & SHOW_REQUEST) == SHOW_REQUEST ) { - if( !is_array($value) && trim($value) == '' ) + if($Action) $debugger->appendHTML('Kernel Action: '.$Action.''); + $debugger->appendHTML('ScriptName: '.$debugger->getFileLink($_SERVER['PATH_TRANSLATED'],1,$script).' ('.dirname($_SERVER['PHP_SELF']).')'); + $requestTable = '
SrcNameValue
+ '; + + foreach($_REQUEST as $key => $value) { - $value = 'no value'; + if( !is_array($value) && trim($value) == '' ) + { + $value = 'no value'; + } + else + { + $value = htmlspecialchars(print_r($value, true)); + } + $src = isset($_GET[$key]) ? 'GE' : (isset($_POST[$key]) ? 'PO' : (isset($_COOKIE[$key]) ? 'CO' : '?') ); + $requestTable .= ''; } - else - { - $value = htmlspecialchars(print_r($value, true)); - } - $src = isset($_GET[$key]) ? 'GE' : (isset($_POST[$key]) ? 'PO' : (isset($_COOKIE[$key]) ? 'CO' : '?') ); - $requestTable .= ''; + $requestTable .= '
SrcNameValue
'.$src.''.$key.''.$value.'
'.$src.''.$key.''.$value.'
'; + $debugger->appendHTML($requestTable); + unset($requestTable); } - $requestTable .= ''; - $debugger->appendHTML($requestTable); - echo 'Reload Frame
'; } - unset($script, $skip_debug, $requestTable); + + if( IsDebugMode() ) + { + echo 'Reload Frame || '; + echo 'Show Debugger
'; + } } +unset($script, $skipDebug); +// ====== Debugger related: end ====== switch($Action) {