Cosmetic improvements.

This commit is contained in:
Loic d'Anterroches 2008-08-29 19:59:53 +02:00
parent ccc41c86b0
commit 2c7b3e1e1a
2 changed files with 7 additions and 11 deletions

View File

@ -35,19 +35,14 @@ class IDF_ScmFactory
public static function getScm($request=null)
{
// Get scm type from project conf ; defaults to git
$scm = $request->conf->getVal('scm', 'git');
// CASE: git
if ($scm === 'git') {
return new IDF_Git($request->project->getGitRepository());
}
// CASE: svn
if ($scm === 'svn') {
switch ($request->conf->getVal('scm', 'git')) {
case 'svn':
return new IDF_Svn($request->conf->getVal('svn_repository'),
$request->conf->getVal('svn_username'),
$request->conf->getVal('svn_password'));
}
case 'git':
default:
return new IDF_Git($request->project->getGitRepository());
}
}

View File

@ -334,7 +334,8 @@ class IDF_Views_Source
*/
private function getScmType($request)
{
return ucfirst($scm = $request->conf->getVal('scm', 'git'));
return mb_convert_case($request->conf->getVal('scm', 'git'),
MB_CASE_TITLE, 'UTF-8');
}
}