1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Debug Backtrace working again.

This commit is contained in:
Cameron
2012-12-06 14:16:55 -08:00
parent cb9af73de1
commit 367ec69c62
5 changed files with 34 additions and 18 deletions

View File

@@ -2061,9 +2061,11 @@ class error_handler
function handle_error($type, $message, $file, $line, $context) {
$startup_error = (!defined('E107_DEBUG_LEVEL')); // Error before debug system initialized
switch($type) {
case E_NOTICE:
if ($startup_error || E107_DBG_ALLERRORS)
if ($startup_error || E107_DBG_ALLERRORS || E107_DBG_ERRBACKTRACE)
{
$error['short'] = "Notice: {$message}, Line {$line} of {$file}<br />\n";
$trace = debug_backtrace();
@@ -2074,7 +2076,7 @@ class error_handler
}
break;
case E_WARNING:
if ($startup_error || E107_DBG_BASIC)
if ($startup_error || E107_DBG_BASIC || E107_DBG_ERRBACKTRACE)
{
$error['short'] = "Warning: {$message}, Line {$line} of {$file}<br />\n";
$trace = debug_backtrace();
@@ -2105,14 +2107,18 @@ class error_handler
$index = 0; $colours[0] = "#C1C1C1"; $colours[1] = "#B6B6B6";
$ret = "";
// print_a($this->errors);
if (E107_DBG_ERRBACKTRACE)
{
foreach ($this->errors as $key => $value)
{
$ret .= "\t<tr>\n\t\t<td class='forumheader3' >{$value['short']}</td><td><input class='button' type ='button' style='cursor: hand; cursor: pointer;' size='30' value='Back Trace' onclick=\"expandit('bt_{$key}')\" /></td>\n\t</tr>\n";
$ret .= "\t<tr>\n\t\t<td class='forumheader3' >{$value['short']}</td><td><input class='button e-expandit' data-target = 'bt_{$key}' type ='button' style='cursor: hand; cursor: pointer;' size='30' value='Back Trace' />\n";
$ret .= "\t<tr>\n<td style='display: none;' colspan='2' id='bt_{$key}'>".print_a($value['trace'], true)."</td></tr>\n";
$ret .= "</td>\n\t</tr>";
if($index == 0) { $index = 1; } else { $index = 0; }
}
}
else
{

View File

@@ -603,7 +603,7 @@ switch ($action)
<td>
".BANLAN_5.":
<div class='label-note'>
".BANLAN_13."<a href='".e_ADMIN_ABS."users.php'><img src='".e_IMAGE_ABS.'admin_images/'."users_16.png' alt='' /></a>
".BANLAN_13."<a href='".e_ADMIN_ABS."users.php'>".E_16_CAT_USER."</a>
</div>
</td>
<td>
@@ -891,7 +891,7 @@ switch ($action)
$val = ($row['banlist_datestamp'] ? strftime($pref['ban_date_format'], $row['banlist_datestamp']) : BANLAN_22);
break;
case 'banlist_bantype':
$val = "<div class='nowrap' title='".$ipAdministrator->getBanTypeString($row['banlist_bantype'], TRUE)."'>".$ipAdministrator->getBanTypeString($row['banlist_bantype'], FALSE)." <a href='#' title='".$ipAdministrator->getBanTypeString($row['banlist_bantype'], TRUE)."' onclick='return false;'><img class='action info S16' src='".e_IMAGE_ABS."admin_images/info_16.png' alt='' /></a></div>";
$val = "<div class='nowrap' title='".$ipAdministrator->getBanTypeString($row['banlist_bantype'], TRUE)."'>".$ipAdministrator->getBanTypeString($row['banlist_bantype'], FALSE)." <a href='#' title='".$ipAdministrator->getBanTypeString($row['banlist_bantype'], TRUE)."' onclick='return false;'>".E_16_CAT_USER."</a></div>";
break;
case 'ip_reason':
$val = e107::getIPHandler()->ipDecode($row['banlist_ip'])."<br />".$fv.": ".$row['banlist_reason'];

View File

@@ -88,7 +88,7 @@ foreach ($helplist as $key => $helpdata)
$id = 'doc-'.$key;
$text_h .= "
<div class='qitem'><img src='".e_IMAGE_ABS."admin_images/docs_16.png' class='icon S16 middle' alt='' /> <a href='#{$id}' class='scroll-to'>".str_replace("_", " ", $helpdata['fname'])."</a></div>
<div class='qitem'>".E_16_DOCS." <a href='#{$id}' class='scroll-to'>".str_replace("_", " ", $helpdata['fname'])."</a></div>
";
$text .= "
<div class='docs-item' id='{$id}'>

View File

@@ -551,17 +551,19 @@ EOF;
foreach($pageInfo as $fkey => $fvalue)
if(vartrue($pageInfo))
{
$dayarray[$td][$fkey]['total'] += $fvalue['ttl'];
$dayarray[$td][$fkey]['unique'] += $fvalue['unq'];
$dayarray[$td]['daytotal'] += $fvalue['ttl'];
$dayarray[$td]['dayunique'] += $fvalue['unq'];
$pagearray[$fkey]['total'] += $fvalue['ttl'];
$pagearray[$fkey]['unique'] += $fvalue['unq'];
$ttotal += $fvalue['ttl'];
$utotal += $fvalue['unq'];
foreach($pageInfo as $fkey => $fvalue)
{
$dayarray[$td][$fkey]['total'] += $fvalue['ttl'];
$dayarray[$td][$fkey]['unique'] += $fvalue['unq'];
$dayarray[$td]['daytotal'] += $fvalue['ttl'];
$dayarray[$td]['dayunique'] += $fvalue['unq'];
$pagearray[$fkey]['total'] += $fvalue['ttl'];
$pagearray[$fkey]['unique'] += $fvalue['unq'];
$ttotal += $fvalue['ttl'];
$utotal += $fvalue['unq'];
}
}

View File

@@ -31,6 +31,12 @@ $(document).ready(function()
$(".e-expandit").click(function () {
var href = ($(this).is("a")) ? $(this).attr("href") : '';
if(href == '' && $(this).attr("data-target"))
{
href = $(this).attr("data-target");
}
if(href === "#" || href == "")
{
@@ -38,9 +44,10 @@ $(document).ready(function()
$(idt).toggle("slow");
return true;
}
var id = $(this).attr("href");
$(id).toggle("slow");
//var id = $(this).attr("href");
$('#'+href).toggle("slow");
return false;
});
@@ -612,6 +619,7 @@ $(document).ready(function()
if(href === "#" || href == "")
{
idt = $(e).next("div");
$(idt).toggle("slow");
return false;;
}