* Code for task#41787.

This commit is contained in:
xieqiyu
2021-08-30 15:53:18 +08:00
parent c478622702
commit 6a2bb96f76
+3 -2
View File
@@ -1348,8 +1348,9 @@ EOD;
global $lang, $app;
$executionPairs = array();
$object = $app->dbh->query('SELECT project FROM ' . TABLE_EXECUTION . " WHERE `id` = '$executionID'")->fetch();
$executionList = $app->dbh->query("SELECT id,name FROM " . TABLE_EXECUTION . " WHERE `project` = '{$object->project}' ORDER BY `id` DESC")->fetchAll();
$object = $app->dbh->query('SELECT project,type FROM ' . TABLE_EXECUTION . " WHERE `id` = '$executionID'")->fetch();
$orderBy = $object->type == 'stage' ? 'ORDER BY `id` ASC' : 'ORDER BY `id` DESC';
$executionList = $app->dbh->query("SELECT id,name FROM " . TABLE_EXECUTION . " WHERE `project` = '{$object->project}' $orderBy")->fetchAll();
foreach($executionList as $execution)
{
if($execution->id == $executionID) continue;