diff --git a/htdocs/lib/CrashReport.php b/htdocs/lib/CrashReport.php index 44ff0c6..3596000 100644 --- a/htdocs/lib/CrashReport.php +++ b/htdocs/lib/CrashReport.php @@ -27,9 +27,9 @@ class CrashReport public static $all_signatures; - function htmlFrame($f) + function htmlFrame($f, $chan, $version) { - static $urlBase = "https://github.com/singularity-viewer/SingularityViewer/blob/master"; + $urlBase = "https://github.com/singularity-viewer/SingularityViewer/blob/" . self::getHash($chan, $version); $ret = ""; $link = ""; @@ -403,4 +403,20 @@ class CrashReport Memc::setq($q, $ret); return $ret; } + + static $builds_map = null; + + static function getHash($chan, $version) + { + if (null == self::$builds_map) + { + self::$builds_map = self::getBuildsMap(); + } + + if (!self::$builds_map[$chan]) $chan = "SingularityAlpha"; + + if (!self::$builds_map[$chan][$version]) return "master"; + + return self::$builds_map[$chan][$version]; + } } \ No newline at end of file diff --git a/htdocs/report_detail.php b/htdocs/report_detail.php index a9ddf17..baa573b 100644 --- a/htdocs/report_detail.php +++ b/htdocs/report_detail.php @@ -62,7 +62,7 @@ $(function() { module) ?> - + client_channel, $report->client_version) ?>