* Finish task#8052.
This commit is contained in:
@@ -12,11 +12,10 @@ class scm
|
||||
*/
|
||||
public function setEngine($repo)
|
||||
{
|
||||
$className = $repo->SCM;
|
||||
$className = $repo->SCM;
|
||||
if($className == 'Git') $className = 'GitRepo';
|
||||
$client = strpos($repo->client, ' ') ? str_replace(' ', '" "', $repo->client) : $repo->client;
|
||||
if(!class_exists($className)) require(strtolower($className) . '.class.php');
|
||||
$this->engine = new $className($client, $repo->path, $repo->account, $repo->password, $repo->encoding);
|
||||
$this->engine = new $className($repo->client, $repo->path, $repo->account, $repo->password, $repo->encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -160,6 +160,7 @@ $lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n"
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding maybe wrong. Please change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,e.g. utf-8";
|
||||
|
||||
@@ -160,6 +160,7 @@ $lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n"
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding might be wrong. Please change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
|
||||
|
||||
@@ -160,6 +160,7 @@ $lang->repo->error->output = "La commande est: %s\nL'erreur est (%s): %s\
|
||||
$lang->repo->error->clientVersion = "La version du client est trop ancienne, veuillez mettre à niveau ou changer le client SVN";
|
||||
$lang->repo->error->encoding = "L'encodage est peut-être erroné. Veuillez modifier l'encodage et réessayer.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
|
||||
$lang->repo->syncTips = '<strong>Vous pouvez trouver la référence sur la façon de définir la synchronisation Git à partir de la page se trouvant <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">ici</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "Les encodages des commentaires de validation peuvent être des valeurs séparées par des virgules,ex: utf-8";
|
||||
|
||||
@@ -160,6 +160,7 @@ $lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n"
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding maybe wrong. Vui lòng change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
|
||||
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
|
||||
|
||||
$lang->repo->syncTips = '<strong>Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8";
|
||||
|
||||
@@ -160,6 +160,7 @@ $lang->repo->error->output = "执行命令:%s\n错误结果(%s): %s\n
|
||||
$lang->repo->error->clientVersion = "客户端版本过低,请升级或更换SVN客户端";
|
||||
$lang->repo->error->encoding = "编码可能错误,请更换编码重试。";
|
||||
$lang->repo->error->deleted = "删除版本库失败,当前版本库有提交记录与设计关联";
|
||||
$lang->repo->error->clientPath = "客户端安装目录不能有空格!";
|
||||
|
||||
$lang->repo->syncTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置版本库定时同步。';
|
||||
$lang->repo->encodingsTips = "提交日志的编码,可以用逗号连接起来的多个,比如utf-8。";
|
||||
|
||||
@@ -158,6 +158,7 @@ $lang->repo->error->noPriv = '程序沒有權限切換到目錄 %s';
|
||||
$lang->repo->error->output = "執行命令:%s\n錯誤結果(%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "客戶端版本過低,請升級或更換SVN客戶端";
|
||||
$lang->repo->error->encoding = "編碼可能錯誤,請更換編碼重試。";
|
||||
$lang->repo->error->clientPath = "客户端安裝目錄不能有空格!";
|
||||
|
||||
$lang->repo->syncTips = '請參照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">這裡</a>,設置版本庫定時同步。';
|
||||
$lang->repo->encodingsTips = "提交日誌的編碼,可以用逗號連接起來的多個,比如utf-8。";
|
||||
|
||||
@@ -930,8 +930,15 @@ class repoModel extends model
|
||||
public function checkConnection()
|
||||
{
|
||||
if(empty($_POST)) return false;
|
||||
|
||||
if(strpos($this->post->client, ' '))
|
||||
{
|
||||
dao::$errors['client'] = $this->lang->repo->error->clientPath;
|
||||
return false;
|
||||
}
|
||||
|
||||
$scm = $this->post->SCM;
|
||||
$client = str_replace(' ', '" "', $this->post->client);
|
||||
$client = $this->post->client;
|
||||
$account = $this->post->account;
|
||||
$password = $this->post->password;
|
||||
$encoding = strtoupper($this->post->encoding);
|
||||
|
||||
Reference in New Issue
Block a user