deleted unneeded code related to the unused 'api_base_url'
This commit is contained in:
parent
7935d25484
commit
e75cba5f43
@ -146,16 +146,10 @@ file_read_access = "anonymous"
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; When set to yes, non-http access is diverted to https using
|
; 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.
|
; 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_compulsory = "no"
|
||||||
https_url = "https://${SERVER_NAME}${REQUEST_URI}"
|
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
|
; Command-separated list of subversion base URLs
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -237,12 +237,10 @@ class Project extends CI_Controller
|
|||||||
// validate the form
|
// validate the form
|
||||||
if ($this->form_validation->run())
|
if ($this->form_validation->run())
|
||||||
{
|
{
|
||||||
$api_base_url = $this->converter->expand (CODEPOT_API_BASE_URL, $_SERVER);
|
|
||||||
|
|
||||||
// if ok, take action
|
// if ok, take action
|
||||||
$result = ($mode == 'update')?
|
$result = ($mode == 'update')?
|
||||||
$this->projects->update ($login['id'], $project):
|
$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 ($result === FALSE)
|
||||||
{
|
{
|
||||||
if ($repo_error)
|
if ($repo_error)
|
||||||
|
@ -153,7 +153,7 @@ class SubversionModel extends CodeRepoModel
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function createRepo ($projectid, $repodir, $cfgdir, $api)
|
static function createRepo ($projectid, $repodir, $cfgdir)
|
||||||
{
|
{
|
||||||
$projdir = "{$repodir}/{$projectid}";
|
$projdir = "{$repodir}/{$projectid}";
|
||||||
try
|
try
|
||||||
|
@ -135,7 +135,7 @@ class ProjectModel extends CI_Model
|
|||||||
return $query->result ();
|
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..
|
// TODO: check if userid can do this..
|
||||||
$repo_error = FALSE;
|
$repo_error = FALSE;
|
||||||
@ -191,12 +191,11 @@ class ProjectModel extends CI_Model
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$url = parse_url(base_url());
|
$url = parse_url(base_url());
|
||||||
$api = $api_base_url . $url['path'] . '/' . CODEPOT_INDEX_PAGE . '/api';
|
|
||||||
|
|
||||||
$cfgdir = CODEPOT_CFG_DIR;
|
$cfgdir = CODEPOT_CFG_DIR;
|
||||||
$repodir = CODEPOT_SVNREPO_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 ();
|
$this->db->trans_rollback ();
|
||||||
$repo_error = TRUE;
|
$repo_error = TRUE;
|
||||||
|
@ -2202,7 +2202,7 @@ class SubversionModel extends CodeRepoModel
|
|||||||
return $tfname;
|
return $tfname;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function createRepo ($projectid, $repodir, $cfgdir, $api)
|
static function createRepo ($projectid, $repodir, $cfgdir)
|
||||||
{
|
{
|
||||||
$projdir = "{$repodir}/{$projectid}";
|
$projdir = "{$repodir}/{$projectid}";
|
||||||
if (@svn_repos_create($projdir) === FALSE) return FALSE;
|
if (@svn_repos_create($projdir) === FALSE) return FALSE;
|
||||||
|
@ -39,7 +39,6 @@ function load_ini ($file)
|
|||||||
|
|
||||||
array ('https_compulsory', 'boolean', FALSE),
|
array ('https_compulsory', 'boolean', FALSE),
|
||||||
array ('https_url', 'string', 'https://${SERVER_NAME}${REQUEST_URI}'),
|
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}://${SERVER_NAME}:${SERVER_PORT}/svn'),
|
||||||
array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${HTTP_POST}/svn'),
|
array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${HTTP_POST}/svn'),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user