* Modify branch check error.

This commit is contained in:
caoyanyi
2022-08-02 15:19:08 +08:00
parent 89336aa212
commit 06abe97624
3 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -77,7 +77,12 @@ class baseHelper
/* 处理$viewType和$vars。Set $viewType and $vars. */
if(empty($viewType)) $viewType = $app->getViewType();
if(!is_array($vars)) parse_str($vars, $vars);
if(!is_array($vars))
{
/* Prevent + from converting to spaces. */
$vars = str_replace('+', '%2B', $vars);
parse_str($vars, $vars);
}
/* 生成url链接的开始部分。Set the begin parts of the link. */
if($config->requestType == 'PATH_INFO') $link = $config->webRoot . $appName;
+1 -1
View File
@@ -162,7 +162,7 @@ class Gitea
{
$localBranch = trim($localBranch);
if(substr($localBranch, 0, 19) == 'remotes/origin/HEAD') continue;
if(substr($localBranch, 0, 1) == '*') $localBranch = substr($localBranch, 1);
if(substr($localBranch, 0, 1) == '*') continue;
if(substr($localBranch, 0, 15) == 'remotes/origin/') $localBranch = substr($localBranch, 15);
$localBranch = trim($localBranch);
+1 -1
View File
@@ -162,7 +162,7 @@ class Gogs
{
$localBranch = trim($localBranch);
if(substr($localBranch, 0, 19) == 'remotes/origin/HEAD') continue;
if(substr($localBranch, 0, 1) == '*') $localBranch = substr($localBranch, 1);
if(substr($localBranch, 0, 1) == '*') continue;
if(substr($localBranch, 0, 15) == 'remotes/origin/') $localBranch = substr($localBranch, 15);
$localBranch = trim($localBranch);