Merging fixes for strict standards errors. Closes #44
This commit is contained in:
parent
71a01425cb
commit
b9415316d4
|
@ -61,7 +61,6 @@ class BuildController extends b8\Controller
|
|||
$data['created'] = !is_null($build->getCreated()) ? $build->getCreated()->format('Y-m-d H:i:s') : null;
|
||||
$data['started'] = !is_null($build->getStarted()) ? $build->getStarted()->format('Y-m-d H:i:s') : null;
|
||||
$data['finished'] = !is_null($build->getFinished()) ? $build->getFinished()->format('Y-m-d H:i:s') : null;
|
||||
$data['plugins'] = $build->getPlugins();
|
||||
|
||||
return json_encode($data);
|
||||
}
|
||||
|
|
|
@ -107,8 +107,6 @@ class ProjectController extends b8\Controller
|
|||
*/
|
||||
public function add()
|
||||
{
|
||||
$_SESSION['github_token'] = isset($_SESSION['github_token']) ? $_SESSION['github_token'] : null;
|
||||
|
||||
if (!Registry::getInstance()->get('user')->getIsAdmin()) {
|
||||
throw new \Exception('You do not have permission to do that.');
|
||||
}
|
||||
|
@ -175,9 +173,11 @@ class ProjectController extends b8\Controller
|
|||
*/
|
||||
protected function handleGithubResponse()
|
||||
{
|
||||
$github = \b8\Registry::getInstance()->get('github_app');
|
||||
$github = \b8\Registry::getInstance()->get('github_app');
|
||||
$code = $this->getParam('code', null);
|
||||
|
||||
$_SESSION['github_token'] = null;
|
||||
|
||||
if (!is_null($code)) {
|
||||
$http = new \b8\HttpClient();
|
||||
$url = 'https://github.com/login/oauth/access_token';
|
||||
|
|
|
@ -31,7 +31,7 @@ class Project extends ProjectBase
|
|||
}
|
||||
|
||||
$order = array('id' => 'DESC');
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, $start, array(), $order);
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, 0, array(), $order);
|
||||
|
||||
if (is_array($builds['items']) && count($builds['items'])) {
|
||||
$latest = array_shift($builds['items']);
|
||||
|
|
Loading…
Reference in a new issue