mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Debug Backtrace working again.
This commit is contained in:
12
class2.php
12
class2.php
@@ -2061,9 +2061,11 @@ class error_handler
|
|||||||
|
|
||||||
function handle_error($type, $message, $file, $line, $context) {
|
function handle_error($type, $message, $file, $line, $context) {
|
||||||
$startup_error = (!defined('E107_DEBUG_LEVEL')); // Error before debug system initialized
|
$startup_error = (!defined('E107_DEBUG_LEVEL')); // Error before debug system initialized
|
||||||
|
|
||||||
|
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case E_NOTICE:
|
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";
|
$error['short'] = "Notice: {$message}, Line {$line} of {$file}<br />\n";
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
@@ -2074,7 +2076,7 @@ class error_handler
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case E_WARNING:
|
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";
|
$error['short'] = "Warning: {$message}, Line {$line} of {$file}<br />\n";
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
@@ -2105,14 +2107,18 @@ class error_handler
|
|||||||
$index = 0; $colours[0] = "#C1C1C1"; $colours[1] = "#B6B6B6";
|
$index = 0; $colours[0] = "#C1C1C1"; $colours[1] = "#B6B6B6";
|
||||||
$ret = "";
|
$ret = "";
|
||||||
|
|
||||||
|
// print_a($this->errors);
|
||||||
|
|
||||||
if (E107_DBG_ERRBACKTRACE)
|
if (E107_DBG_ERRBACKTRACE)
|
||||||
{
|
{
|
||||||
foreach ($this->errors as $key => $value)
|
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 .= "\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; }
|
if($index == 0) { $index = 1; } else { $index = 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -603,7 +603,7 @@ switch ($action)
|
|||||||
<td>
|
<td>
|
||||||
".BANLAN_5.":
|
".BANLAN_5.":
|
||||||
<div class='label-note'>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -891,7 +891,7 @@ switch ($action)
|
|||||||
$val = ($row['banlist_datestamp'] ? strftime($pref['ban_date_format'], $row['banlist_datestamp']) : BANLAN_22);
|
$val = ($row['banlist_datestamp'] ? strftime($pref['ban_date_format'], $row['banlist_datestamp']) : BANLAN_22);
|
||||||
break;
|
break;
|
||||||
case 'banlist_bantype':
|
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;
|
break;
|
||||||
case 'ip_reason':
|
case 'ip_reason':
|
||||||
$val = e107::getIPHandler()->ipDecode($row['banlist_ip'])."<br />".$fv.": ".$row['banlist_reason'];
|
$val = e107::getIPHandler()->ipDecode($row['banlist_ip'])."<br />".$fv.": ".$row['banlist_reason'];
|
||||||
|
@@ -88,7 +88,7 @@ foreach ($helplist as $key => $helpdata)
|
|||||||
|
|
||||||
$id = 'doc-'.$key;
|
$id = 'doc-'.$key;
|
||||||
$text_h .= "
|
$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 .= "
|
$text .= "
|
||||||
<div class='docs-item' id='{$id}'>
|
<div class='docs-item' id='{$id}'>
|
||||||
|
@@ -551,17 +551,19 @@ EOF;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(vartrue($pageInfo))
|
||||||
foreach($pageInfo as $fkey => $fvalue)
|
|
||||||
{
|
{
|
||||||
$dayarray[$td][$fkey]['total'] += $fvalue['ttl'];
|
foreach($pageInfo as $fkey => $fvalue)
|
||||||
$dayarray[$td][$fkey]['unique'] += $fvalue['unq'];
|
{
|
||||||
$dayarray[$td]['daytotal'] += $fvalue['ttl'];
|
$dayarray[$td][$fkey]['total'] += $fvalue['ttl'];
|
||||||
$dayarray[$td]['dayunique'] += $fvalue['unq'];
|
$dayarray[$td][$fkey]['unique'] += $fvalue['unq'];
|
||||||
$pagearray[$fkey]['total'] += $fvalue['ttl'];
|
$dayarray[$td]['daytotal'] += $fvalue['ttl'];
|
||||||
$pagearray[$fkey]['unique'] += $fvalue['unq'];
|
$dayarray[$td]['dayunique'] += $fvalue['unq'];
|
||||||
$ttotal += $fvalue['ttl'];
|
$pagearray[$fkey]['total'] += $fvalue['ttl'];
|
||||||
$utotal += $fvalue['unq'];
|
$pagearray[$fkey]['unique'] += $fvalue['unq'];
|
||||||
|
$ttotal += $fvalue['ttl'];
|
||||||
|
$utotal += $fvalue['unq'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -32,6 +32,12 @@ $(document).ready(function()
|
|||||||
|
|
||||||
var href = ($(this).is("a")) ? $(this).attr("href") : '';
|
var href = ($(this).is("a")) ? $(this).attr("href") : '';
|
||||||
|
|
||||||
|
if(href == '' && $(this).attr("data-target"))
|
||||||
|
{
|
||||||
|
href = $(this).attr("data-target");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(href === "#" || href == "")
|
if(href === "#" || href == "")
|
||||||
{
|
{
|
||||||
idt = $(this).nextAll("div");
|
idt = $(this).nextAll("div");
|
||||||
@@ -39,8 +45,9 @@ $(document).ready(function()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var id = $(this).attr("href");
|
|
||||||
$(id).toggle("slow");
|
//var id = $(this).attr("href");
|
||||||
|
$('#'+href).toggle("slow");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -612,6 +619,7 @@ $(document).ready(function()
|
|||||||
if(href === "#" || href == "")
|
if(href === "#" || href == "")
|
||||||
{
|
{
|
||||||
idt = $(e).next("div");
|
idt = $(e).next("div");
|
||||||
|
|
||||||
$(idt).toggle("slow");
|
$(idt).toggle("slow");
|
||||||
return false;;
|
return false;;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user