This commit is contained in:
zhaoke
2023-09-07 13:37:37 +08:00
parent f20432b7fe
commit 9ff48ea79d
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -377,6 +377,7 @@ class giteaModel extends model
$gitea = $this->getByID($giteaID);
$oauth = "oauth2:{$gitea->token}@";
$project->tokenCloneUrl = preg_replace('/(http(s)?:\/\/)/', "\$1$oauth", $project->html_url);
$project->tokenCloneUrl = str_replace(array('https://', 'http://'), strstr($url, ':', true) . '://', $project->tokenCloneUrl);
}
return $project;
+1 -1
View File
@@ -454,7 +454,7 @@ class system extends control
{
session_write_close();
$this->system->saveDomainSettings();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::$errors));
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError(true)));
return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->updateDomainSuccess, 'locate' => $this->inlink('domainView')));
}