Link to sepecific commit id on github
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ $(function() {
|
||||
<tr>
|
||||
<td width="5%" style="text-align: right;"><?php echo $frameID ?></td>
|
||||
<td width="20%"><?php echo htmlentities($f->module) ?></td>
|
||||
<td width="75%"><?php echo CrashReport::htmlFrame($f) ?></td>
|
||||
<td width="75%"><?php echo CrashReport::htmlFrame($f, $report->client_channel, $report->client_version) ?></td>
|
||||
</tr>
|
||||
<?php endfor ?>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user