diff --git a/lib/scm/scm.class.php b/lib/scm/scm.class.php index c2818a6f3a..966e32057a 100644 --- a/lib/scm/scm.class.php +++ b/lib/scm/scm.class.php @@ -14,8 +14,9 @@ class 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($repo->client, $repo->path, $repo->account, $repo->password, $repo->encoding); + $this->engine = new $className($client, $repo->path, $repo->account, $repo->password, $repo->encoding); } /** diff --git a/module/repo/model.php b/module/repo/model.php index c9daef10d6..17763071cf 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -931,7 +931,7 @@ class repoModel extends model { if(empty($_POST)) return false; $scm = $this->post->SCM; - $client = $this->post->client; + $client = str_replace(' ', '" "', $this->post->client); $account = $this->post->account; $password = $this->post->password; $encoding = strtoupper($this->post->encoding);