From 8dd29da01a34be3e85884ddd0a89debffe343705 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Tue, 15 Oct 2013 10:04:06 +0200 Subject: [PATCH] Added commenting on the list page --- htdocs/crashes.php | 26 ++++++++++++++++++++++++++ htdocs/css/singularity/singularity.css | 7 +++++-- htdocs/lib/CrashStats.php | 18 +++++++++++++++++- htdocs/lib/SearchFilter.php | 2 +- htdocs/report_detail.php | 4 ++++ htdocs/report_tip.php | 16 +--------------- 6 files changed, 54 insertions(+), 19 deletions(-) diff --git a/htdocs/crashes.php b/htdocs/crashes.php index 99cc567..ff40b1b 100644 --- a/htdocs/crashes.php +++ b/htdocs/crashes.php @@ -116,6 +116,32 @@ $filter->render();
+ + + + + + + + + + + + + + + +
SignatureNotes
+ +
+ + + + diff --git a/htdocs/css/singularity/singularity.css b/htdocs/css/singularity/singularity.css index d4b705e..2f3cf33 100644 --- a/htdocs/css/singularity/singularity.css +++ b/htdocs/css/singularity/singularity.css @@ -76,14 +76,17 @@ tr.rowhighlight a { height: 100%; } +table { + border-spacing: 0px; + /*border-collapse:collapse;*/ +} + table.jtable tr:hover, table.jtable th { background: #2b3233 url(images/ui-bg_highlight-hard_20_2b3233_1x100.png) 50% 50% repeat-x; color: #ffffff; } table.jtable { - border-spacing: 0px; - /*border-collapse:collapse;*/ border: 1px solid #555555; background: #1e1e1e url(images/ui-bg_flat_25_1e1e1e_40x100.png) 50% 50% repeat-x; color: #c5c5c5; diff --git a/htdocs/lib/CrashStats.php b/htdocs/lib/CrashStats.php index a410bbe..33b3d29 100644 --- a/htdocs/lib/CrashStats.php +++ b/htdocs/lib/CrashStats.php @@ -45,7 +45,7 @@ class CrashStats return $ret; } - function getSignature($id) + static function getSignature($id) { $ret = new stdClass; $q = kl_str_sql("select * from signature where id=!i", $id); @@ -64,6 +64,22 @@ class CrashStats return false; } + static function renderSignature($id) + { + if (!$r = self::getSignature($id)) return ""; + + $parts = explode("|", $r->signature); + $txt = ""; + if ($parts[1]) $txt .= preg_replace("/((::|<|>|,|\\(|\\)))/", "\\1", htmlentities($parts[1])); + if ($txt) $txt .= "

"; + if ($parts[2]) $txt .= preg_replace("/((::|<|>|,|\\(|\\)))/", "\\1", htmlentities($parts[2])); + + $ret = "

Module: " . $parts[0]; + if ($txt) $ret .= "

" . $txt . "

"; + + return $ret; + } + function getGPUStats() { $ret = array(); diff --git a/htdocs/lib/SearchFilter.php b/htdocs/lib/SearchFilter.php index 296f7b9..c6aface 100644 --- a/htdocs/lib/SearchFilter.php +++ b/htdocs/lib/SearchFilter.php @@ -158,7 +158,7 @@ class SearchFilter
-
Filter
+
Filter
diff --git a/htdocs/report_detail.php b/htdocs/report_detail.php index 4c256b7..a9ddf17 100644 --- a/htdocs/report_detail.php +++ b/htdocs/report_detail.php @@ -123,6 +123,10 @@ $(function() {
+ + + + diff --git a/htdocs/report_tip.php b/htdocs/report_tip.php index 1509d0a..1c246f5 100644 --- a/htdocs/report_tip.php +++ b/htdocs/report_tip.php @@ -4,18 +4,4 @@ define("SITE_ROOT", realpath(dirname(__file__))); require_once SITE_ROOT . "/lib/init.php"; $S->requireUser(); -$stats = new CrashStats($filter); - -if (false === $r = $stats->getSignature((int)$_GET["signature_id"])) -{ - print "

No such signature

"; -} - -$parts = explode("|", $r->signature); -$txt = ""; -if ($parts[1]) $txt .= preg_replace("/((::|<|>|,|\\(|\\)))/", "\\1", htmlentities($parts[1])); -if ($txt) $txt .= "

"; -if ($parts[2]) $txt .= preg_replace("/((::|<|>|,|\\(|\\)))/", "\\1", htmlentities($parts[2])); - -print "

Module: " . $parts[0]; -if ($txt) print "

" . $txt . "

"; \ No newline at end of file +print CrashStats::renderSignature((int)$_GET["signature_id"]); \ No newline at end of file
ID
Crash Reason crash_reason . " at " . $report->crash_address . " thread " . $report->crash_thread) ?>
Crash Typesignature_id ?>
Minidump Download