Fixing PHPCI so that it'll work in a subdirectory.
This commit is contained in:
parent
b9415316d4
commit
f256db237b
14 changed files with 66 additions and 53 deletions
|
|
@ -81,7 +81,7 @@ class BuildController extends b8\Controller
|
|||
|
||||
$build = $this->_buildStore->save($build);
|
||||
|
||||
header('Location: /build/view/' . $build->getId());
|
||||
header('Location: '.PHPCI_URL.'build/view/' . $build->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -96,7 +96,7 @@ class BuildController extends b8\Controller
|
|||
$build = $this->_buildStore->getById($buildId);
|
||||
$this->_buildStore->delete($build);
|
||||
|
||||
header('Location: /project/view/' . $build->getProjectId());
|
||||
header('Location: '.PHPCI_URL.'project/view/' . $build->getProjectId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class ProjectController extends b8\Controller
|
|||
|
||||
$build = $this->_buildStore->save($build);
|
||||
|
||||
header('Location: /build/view/' . $build->getId());
|
||||
header('Location: '.PHPCI_URL.'build/view/' . $build->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -76,7 +76,7 @@ class ProjectController extends b8\Controller
|
|||
$project = $this->_projectStore->getById($projectId);
|
||||
$this->_projectStore->delete($project);
|
||||
|
||||
header('Location: /');
|
||||
header('Location: '.PHPCI_URL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -164,7 +164,7 @@ class ProjectController extends b8\Controller
|
|||
|
||||
$project = $this->_projectStore->save($project);
|
||||
|
||||
header('Location: /project/view/' . $project->getId());
|
||||
header('Location: '.PHPCI_URL.'project/view/' . $project->getId());
|
||||
die;
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ class ProjectController extends b8\Controller
|
|||
if ($resp['success']) {
|
||||
parse_str($resp['body'], $resp);
|
||||
$_SESSION['github_token'] = $resp['access_token'];
|
||||
header('Location: /project/add');
|
||||
header('Location: '.PHPCI_URL.'project/add');
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ class ProjectController extends b8\Controller
|
|||
$project->setValues($values);
|
||||
$project = $this->_projectStore->save($project);
|
||||
|
||||
header('Location: /project/view/' . $project->getId());
|
||||
header('Location: '.PHPCI_URL.'project/view/' . $project->getId());
|
||||
die;
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ class ProjectController extends b8\Controller
|
|||
{
|
||||
$form = new Form();
|
||||
$form->setMethod('POST');
|
||||
$form->setAction('/project/' . $type);
|
||||
$form->setAction(PHPCI_URL.'project/' . $type);
|
||||
$form->addField(new Form\Element\Csrf('csrf'));
|
||||
$form->addField(new Form\Element\Hidden('token'));
|
||||
$form->addField(new Form\Element\Hidden('pubkey'));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class SessionController extends b8\Controller
|
|||
|
||||
if ($user && password_verify($this->getParam('password', ''), $user->getHash())) {
|
||||
$_SESSION['user_id'] = $user->getId();
|
||||
header('Location: /');
|
||||
header('Location: ' . PHPCI_URL);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ class SessionController extends b8\Controller
|
|||
{
|
||||
$_SESSION = array();
|
||||
session_destroy();
|
||||
header('Location: /');
|
||||
header('Location: ' . PHPCI_URL);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class UserController extends b8\Controller
|
|||
|
||||
$user = $this->_userStore->save($user);
|
||||
|
||||
header('Location: /user');
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ class UserController extends b8\Controller
|
|||
$user->setValues($values);
|
||||
$user = $this->_userStore->save($user);
|
||||
|
||||
header('Location: /user');
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ class UserController extends b8\Controller
|
|||
$user = $this->_userStore->getById($userId);
|
||||
$this->_userStore->delete($user);
|
||||
|
||||
header('Location: /user');
|
||||
header('Location: '.PHPCI_URL.'user');
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue