* [misc] adjust repo code.

This commit is contained in:
caoyanyi
2024-10-23 14:21:57 +08:00
committed by 田淑杰
parent 1a70951891
commit 08dc46232c
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -1510,7 +1510,7 @@ class repoModel extends model
preg_match_all("/{$rules['designReg']}/i", $comment, $matches);
if($matches[0])
{
$designs = join(' ', $matches[1]);
$designs = implode(' ', $matches[1]);
if($designs) $designs = array_unique(explode(' ', str_replace(',', ' ', $designs)));
}
+3 -5
View File
@@ -1309,14 +1309,12 @@ class repoZen extends repo
$oldRevision = isset($this->post->revision[1]) ? $this->post->revision[1] : '';
$newRevision = isset($this->post->revision[0]) ? $this->post->revision[0] : '';
if($this->post->arrange)
{
$arrange = $this->post->arrange;
helper::setcookie('arrange', $arrange);
}
if($this->post->encoding) $encoding = $this->post->encoding;
if($this->post->isBranchOrTag) $isBranchOrTag = (int)$this->post->isBranchOrTag;
if($this->post->arrange) $arrange = $this->post->arrange;
helper::setcookie('arrange', $arrange);
return $this->locate($this->repo->createLink('diff', "repoID={$repoID}&objectID={$objectID}&entry={$file}&oldrevision={$oldRevision}&newRevision={$newRevision}&showBug=0&encoding={$encoding}&isBranchOrTag={$isBranchOrTag}"));
}