* Fix Gitlab judgement.

This commit is contained in:
Guanxiying
2021-04-22 10:35:16 +08:00
parent a515c25eae
commit 5ec52b5ba4
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -38,7 +38,7 @@
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
}
echo '/' . ' ' . $fileName;
if($repo->SCM == 'Git')
if(strpos($repo->SCM, 'Git') !== false)
{
$oldRevision = $oldRevision == '^' ? "$newRevision" : $oldRevision;
echo " <span class='label label-info'>" . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . $historys[$oldRevision] . ' : ' . $historys[$newRevision] . ')</span>';
@@ -155,7 +155,7 @@
</div>
<div class='revisions hidden'>
<?php
if($repo->SCM == 'Git')
if(strpos($repo->SCM, 'Git') !== false)
{
$oldRevision = $oldRevision == '^' ? "$newRevision" : $oldRevision;
echo " <span class='label label-info'>" . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . $historys[$oldRevision] . ' : ' . $historys[$newRevision] . ')</span>';