Added commenting on the list page

This commit is contained in:
Latif Khalifa
2013-10-15 10:04:06 +02:00
parent a0a18e9378
commit 8dd29da01a
6 changed files with 54 additions and 19 deletions

View File

@@ -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("/((::|&lt;|&gt;|,|\\(|\\)))/", "<wbr/>\\1<wbr/>", htmlentities($parts[1]));
if ($txt) $txt .= "<br/><br/>";
if ($parts[2]) $txt .= preg_replace("/((::|&lt;|&gt;|,|\\(|\\)))/", "<wbr/>\\1<wbr/>", htmlentities($parts[2]));
$ret = "<p>Module: " . $parts[0];
if ($txt) $ret .= "<br/><br/>" . $txt . "</p>";
return $ret;
}
function getGPUStats()
{
$ret = array();