mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Finally the debugger shows only what it's meant to and no longer creates Xhtml errors in some cases.
This commit is contained in:
parent
c776655611
commit
8fa5d97fde
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/footer.php,v $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2008-04-06 21:38:02 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.11 $
|
||||
| $Date: 2009-07-12 02:29:23 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@ -215,8 +215,7 @@ if ($pref['developer']) {
|
||||
if((ADMIN == true || $pref['developer']) && count($error_handler->errors) && $error_handler->debug == true)
|
||||
{
|
||||
echo "
|
||||
<br /><br />
|
||||
<div class='e107_debug php_err'>
|
||||
<div class='e107_debug php_err block-text'>
|
||||
<h3>PHP Errors:</h3><br />
|
||||
".$error_handler->return_errors()."
|
||||
</div>
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/bbcode_handler.php,v $
|
||||
| $Revision: 1.13 $
|
||||
| $Date: 2007-11-13 07:38:55 $
|
||||
| $Revision: 1.14 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -290,10 +290,8 @@ class e_bbcode
|
||||
}
|
||||
}
|
||||
global $e107_debug;
|
||||
if(E107_DBG_BBSC)
|
||||
{
|
||||
trigger_error("starting bbcode [$code]", E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
ob_start();
|
||||
$bbcode_return = eval($bbcode);
|
||||
$bbcode_output = ob_get_contents();
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/db_debug_class.php,v $
|
||||
| $Revision: 1.9 $
|
||||
| $Date: 2009-07-08 01:29:54 $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -155,7 +155,7 @@ class e107_db_debug {
|
||||
if ($bExplained)
|
||||
{
|
||||
$bRowHeaders=FALSE;
|
||||
while ($row = @mysql_fetch_assoc($sQryRes))
|
||||
while ($row = @mysql_fetch_assoc($sQryRes))
|
||||
{
|
||||
if (!$bRowHeaders)
|
||||
{
|
||||
@ -193,6 +193,12 @@ class e107_db_debug {
|
||||
//
|
||||
// Show stats from aSQLdetails array
|
||||
//
|
||||
if (!E107_DBG_SQLQUERIES && !E107_DBG_SQLDETAILS)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
$text='';
|
||||
$nQueries=$sql->db_QueryCount();
|
||||
|
||||
@ -431,7 +437,7 @@ class e107_db_debug {
|
||||
}
|
||||
$this -> scbbcodes[$this -> scbcount]['type'] = $type;
|
||||
$this -> scbbcodes[$this -> scbcount]['code'] = $code;
|
||||
$this -> scbbcodes[$this -> scbcount]['parm'] = $parm;
|
||||
$this -> scbbcodes[$this -> scbcount]['parm'] = htmlentities($parm);
|
||||
$this -> scbbcodes[$this -> scbcount]['postID'] = $postID;
|
||||
$this -> scbcount ++;
|
||||
}
|
||||
@ -442,6 +448,8 @@ class e107_db_debug {
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
$text = "<table class='fborder' style='width: 100%'>
|
||||
<tr><td class='fcaption' colspan='4'><b>Shortcode / BBCode</b></td></tr>
|
||||
<tr>
|
||||
@ -451,7 +459,7 @@ class e107_db_debug {
|
||||
<td class='fcaption' style='width: 10%;'>Post ID</td>
|
||||
</tr>\n";
|
||||
|
||||
foreach($this -> scbbcodes as $codes)
|
||||
foreach($this -> scbbcodes as $codes)
|
||||
{
|
||||
$text .= "<tr>
|
||||
<td class='forumheader3' style='width: 10%;'>".($codes['type'] == 1 ? "BBCode" : "Shortcode")."</td>
|
||||
|
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/debug_handler.php,v $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2008-01-19 13:17:02 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -82,6 +82,7 @@ define('E107_DBG_ERRBACKTRACE', (E107_DEBUG_LEVEL & 8192)); // show backtrac
|
||||
define('E107_DBG_DEPRECATED', (E107_DEBUG_LEVEL & 16384)); // Show use of deprecated functions
|
||||
define('E107_DBG_ALLERRORS', (E107_DEBUG_LEVEL & 32768)); // show ALL php errors (including notices), not just fatal issues
|
||||
define('E107_DBG_INCLUDES', (E107_DEBUG_LEVEL & 65536)); // show included file list
|
||||
define('E107_DBG_NOTICES', (E107_DEBUG_LEVEL & 32768)); // show included file list
|
||||
|
||||
class e107_debug {
|
||||
|
||||
@ -99,8 +100,8 @@ class e107_debug {
|
||||
|
||||
'detail' => 16740351, // (0+0xfffff-32768-4096) all details, except notice and inline sc
|
||||
'd' => 16740351, // all details, except notice and inline sc
|
||||
'time' => 257, // time details and php errors
|
||||
'sql' => 513, // sql details and php errors
|
||||
'time' => 256, // time details and php errors
|
||||
'sql' => 512, // sql details and php errors
|
||||
'paths' => 1024, // dump path strings
|
||||
'bbsc' => 2048, // show bb and sc details
|
||||
'sc' => 4096, // Shortcode paths dumped inline
|
||||
@ -122,7 +123,7 @@ class e107_debug {
|
||||
{
|
||||
$dVals = substr($_COOKIE['e107_debug_level'],6);
|
||||
}
|
||||
if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU))
|
||||
if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU))
|
||||
{
|
||||
$dVals = $debug_param[1] == '=' ? $debug_param[2] : 'everything';
|
||||
}
|
||||
|
@ -12,9 +12,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/shortcode_handler.php,v $
|
||||
| $Revision: 1.25 $
|
||||
| $Date: 2009-02-03 11:58:36 $
|
||||
| $Author: lisa_ $
|
||||
| $Revision: 1.26 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -210,16 +210,22 @@ class e_shortcode
|
||||
$parm = trim($parm);
|
||||
$parm = str_replace(array('[[', ']]'), array('{', '}'), $parm);
|
||||
|
||||
if (E107_DBG_BBSC)
|
||||
if (E107_DBG_BBSC || E107_DBG_SC)
|
||||
{
|
||||
global $db_debug;
|
||||
$sql->db_Mark_Time("SC $code");
|
||||
$db_debug->logCode(2, $code, $parm, "");
|
||||
}
|
||||
|
||||
if(E107_DBG_BBSC)
|
||||
if(E107_DBG_SC)
|
||||
{
|
||||
trigger_error('starting shortcode {'.$code.'}', E_USER_ERROR);
|
||||
echo "<strong>";
|
||||
echo '{';
|
||||
echo $code;
|
||||
echo ($parm) ? '='.htmlentities($parm) : "";
|
||||
echo '}';
|
||||
echo "</strong>";
|
||||
// trigger_error('starting shortcode {'.$code.'}', E_USER_ERROR); // no longer useful - use ?[debug=bbsc]
|
||||
}
|
||||
|
||||
$scCode = '';
|
||||
@ -328,8 +334,8 @@ class e_shortcode
|
||||
|
||||
if(E107_DBG_SC && $scFile)
|
||||
{
|
||||
echo (isset($scFile)) ? "<br />sc_file= ".str_replace(e_FILE.'shortcode/', '', $scFile).'<br />' : '';
|
||||
echo "<br />sc= <b>$code</b>";
|
||||
// echo (isset($scFile)) ? "<br />sc_file= ".str_replace(e_FILE.'shortcode/', '', $scFile).'<br />' : '';
|
||||
// echo "<br />sc= <b>$code</b>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/footer_default.php,v $
|
||||
| $Revision: 1.14 $
|
||||
| $Date: 2008-12-29 18:17:46 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.15 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@ -214,8 +214,7 @@ if ($pref['developer']) {
|
||||
if((ADMIN == true || $pref['developer']) && count($error_handler->errors) && $error_handler->debug == true)
|
||||
{
|
||||
echo "
|
||||
<br /><br />
|
||||
<div class='e107_debug php_err'>
|
||||
<div class='e107_debug php_err block-text'>
|
||||
<h3>PHP Errors:</h3><br />
|
||||
".$error_handler->return_errors()."
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user