Index: branches/5.3.x/core/kernel/utility/debugger.php =================================================================== diff -u -N -r16545 -r16730 --- branches/5.3.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 16545) +++ branches/5.3.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 16730) @@ -1,6 +1,6 @@ scrollbarWidth = $this->isGecko() ? 22 : 25; - $this->appendRequest(); + // Mark place, where request information will be inserted. + $this->HeaderEndingDataIndex = count($this->Data); } /** @@ -1120,6 +1128,28 @@ } /** + * Inserts HTML code without transformations at given position + * + * @param string $html HTML. + * @param integer $position Position. + * + * @return integer + */ + public function insertHTML($html, $position) + { + array_splice( + $this->Data, + $position, + 0, + array( + array('html' => $html, 'debug_type' => 'html'), + ) + ); + + return $position + 1; + } + + /** * Returns instance of FirePHP class * * @return FirePHP @@ -1209,9 +1239,18 @@ $script = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF']; } - $this->appendHTML('ScriptName: ' . $this->getFileLink($script, 1, basename($script)) . ' (' . dirname($script) . ')'); + $insert_at_index = $this->HeaderEndingDataIndex; + + $insert_at_index = $this->insertHTML( + 'ScriptName: ' . $this->getFileLink($script, 1, basename($script)) . ' (' . dirname($script) . ')', + $insert_at_index + ); + if ( $this->_isAjax ) { - $this->appendHTML('RequestURI: ' . $_SERVER['REQUEST_URI'] . ' (QS Length:' . strlen($_SERVER['QUERY_STRING']) . ')'); + $insert_at_index = $this->insertHTML( + 'RequestURI: ' . $_SERVER['REQUEST_URI'] . ' (QS Length:' . strlen($_SERVER['QUERY_STRING']) . ')', + $insert_at_index + ); } $tools_html = ' @@ -1220,7 +1259,7 @@
' . $this->_getToolsHTML() . '
'; - $this->appendHTML($tools_html); + $insert_at_index = $this->insertHTML($tools_html, $insert_at_index); ob_start(); ?> @@ -1229,7 +1268,16 @@ SrcNameValue $_GET, 'PO' => $_POST, 'CO' => $_COOKIE); + if ( is_object($this->Application) ) { + $super_globals = array( + 'GE' => $this->Application->HttpQuery->Get, + 'PO' => $this->Application->HttpQuery->Post, + 'CO' => $this->Application->HttpQuery->Cookie, + ); + } + else { + $super_globals = array('GE' => $_GET, 'PO' => $_POST, 'CO' => $_COOKIE); + } foreach ($super_globals as $prefix => $data) { foreach ($data as $key => $value) { @@ -1246,7 +1294,7 @@ ?> appendHTML(ob_get_contents()); + $this->insertHTML(ob_get_contents(), $insert_at_index); ob_end_clean(); } @@ -1568,6 +1616,7 @@ DebuggerUtil::safeDefine('DBG_RAISE_ON_WARNINGS', 0); DebuggerUtil::safeDefine('DBG_TOOLBAR_BUTTONS', 1); + $this->appendRequest(); $this->appendSession(); // show php session if any // ensure, that 1st line of debug output always is this one: