diff --git a/codepot/etc/codepot.ini.in b/codepot/etc/codepot.ini.in index 8faba9a7..67e729c0 100644 --- a/codepot/etc/codepot.ini.in +++ b/codepot/etc/codepot.ini.in @@ -146,16 +146,10 @@ file_read_access = "anonymous" ;------------------------------------------------------------------------------ ; When set to yes, non-http access is diverted to https using ; the base URL specified in https_base_url. api calls are not affected. -; change api_base_url to force https api calls instead. ;------------------------------------------------------------------------------ https_compulsory = "no" https_url = "https://${SERVER_NAME}${REQUEST_URI}" -;------------------------------------------------------------------------------ -; API base URL (Deprecated as of v0.1.2. Not useful anymore) -;------------------------------------------------------------------------------ -api_base_url = "http://127.0.0.1" - ;------------------------------------------------------------------------------ ; Command-separated list of subversion base URLs ;------------------------------------------------------------------------------ diff --git a/codepot/src/codepot/controllers/project.php b/codepot/src/codepot/controllers/project.php index 2ce2cb5d..dde2efcf 100644 --- a/codepot/src/codepot/controllers/project.php +++ b/codepot/src/codepot/controllers/project.php @@ -237,12 +237,10 @@ class Project extends CI_Controller // validate the form if ($this->form_validation->run()) { - $api_base_url = $this->converter->expand (CODEPOT_API_BASE_URL, $_SERVER); - // if ok, take action $result = ($mode == 'update')? $this->projects->update ($login['id'], $project): - $this->projects->create ($login['id'], $project, $api_base_url, $repo_error); + $this->projects->create ($login['id'], $project, $repo_error); if ($result === FALSE) { if ($repo_error) diff --git a/codepot/src/codepot/models/gitmodel.php b/codepot/src/codepot/models/gitmodel.php index baff85a1..5714f138 100644 --- a/codepot/src/codepot/models/gitmodel.php +++ b/codepot/src/codepot/models/gitmodel.php @@ -153,7 +153,7 @@ class SubversionModel extends CodeRepoModel return FALSE; } - static function createRepo ($projectid, $repodir, $cfgdir, $api) + static function createRepo ($projectid, $repodir, $cfgdir) { $projdir = "{$repodir}/{$projectid}"; try diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index c80e2620..61a50490 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -135,7 +135,7 @@ class ProjectModel extends CI_Model return $query->result (); } - function create ($userid, $project, $api_base_url, &$repo_error) + function create ($userid, $project, &$repo_error) { // TODO: check if userid can do this.. $repo_error = FALSE; @@ -191,12 +191,11 @@ class ProjectModel extends CI_Model else { $url = parse_url(base_url()); - $api = $api_base_url . $url['path'] . '/' . CODEPOT_INDEX_PAGE . '/api'; $cfgdir = CODEPOT_CFG_DIR; $repodir = CODEPOT_SVNREPO_DIR; - if (SubversionModel::createRepo($project->id, $repodir, $cfgdir, $api) === FALSE) + if (SubversionModel::createRepo($project->id, $repodir, $cfgdir) === FALSE) { $this->db->trans_rollback (); $repo_error = TRUE; diff --git a/codepot/src/codepot/models/subversionmodel.php b/codepot/src/codepot/models/subversionmodel.php index 3d2554f1..9a2bab31 100644 --- a/codepot/src/codepot/models/subversionmodel.php +++ b/codepot/src/codepot/models/subversionmodel.php @@ -2202,7 +2202,7 @@ class SubversionModel extends CodeRepoModel return $tfname; } - static function createRepo ($projectid, $repodir, $cfgdir, $api) + static function createRepo ($projectid, $repodir, $cfgdir) { $projdir = "{$repodir}/{$projectid}"; if (@svn_repos_create($projdir) === FALSE) return FALSE; diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index 3f920fbe..93134144 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -39,7 +39,6 @@ function load_ini ($file) array ('https_compulsory', 'boolean', FALSE), array ('https_url', 'string', 'https://${SERVER_NAME}${REQUEST_URI}'), - array ('api_base_url', 'string', 'http://127.0.0.1'), //array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${SERVER_NAME}:${SERVER_PORT}/svn'), array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${HTTP_POST}/svn'),