* Adjust scm load file logic.
This commit is contained in:
@@ -12,10 +12,11 @@ class scm
|
||||
*/
|
||||
public function setEngine($repo)
|
||||
{
|
||||
$className = strtolower($repo->SCM) . 'Repo';
|
||||
if($repo->SCM == 'Git') $repo->SCM = 'GitRepo';
|
||||
if(!class_exists($className)) require(strtolower($repo->SCM) . '.class.php');
|
||||
$this->engine = new $className($repo->client, in_array($repo->SCM, array('Gitlab', 'GitFox')) ? $repo->apiPath : $repo->path, $repo->account, $repo->password, $repo->encoding, $repo);
|
||||
$scm = strtolower($repo->SCM);
|
||||
$className = $scm . 'Repo';
|
||||
if($scm == 'git') $scm = 'gitrepo';
|
||||
if(!class_exists($className)) require($scm . '.class.php');
|
||||
$this->engine = new $className($repo->client, in_array($scm, array('gitlab', 'gitfox')) ? $repo->apiPath : $repo->path, $repo->account, $repo->password, $repo->encoding, $repo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user