Hopefully re-greening the build.
This commit is contained in:
parent
e2d901a54a
commit
ead24da1a5
4 changed files with 34 additions and 26 deletions
|
|
@ -123,11 +123,13 @@ class BuildStore extends BuildStoreBase
|
|||
$select = '`bm`.`build_id`, `bm`.`meta_key`, `bm`.`meta_value`';
|
||||
$and = $numResults > 1 ? ' AND (`bm`.`build_id` <= :buildId) ' : ' AND (`bm`.`build_id` = :buildId) ';
|
||||
$where = '`bm`.`meta_key` = :key AND `bm`.`project_id` = :projectId ' . $and;
|
||||
$from = ' `build_meta` AS `bm`';
|
||||
if($branch !== null) {
|
||||
$from = ' `build_meta` AS `bm`';
|
||||
|
||||
if ($branch !== null) {
|
||||
$where .= ' AND `b`.`branch` = :branch AND `b`.`id`= `bm`.`build_id` ';
|
||||
$from .= ', `build` AS `b`';
|
||||
}
|
||||
}
|
||||
|
||||
$query = 'SELECT '.$select.' FROM '.$from.' WHERE '.$where.' ORDER BY `bm`.id DESC LIMIT :numResults';
|
||||
|
||||
$stmt = Database::getConnection('read')->prepare($query);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue