Skip to content

Commit 4aeeb61

Browse files
Remove hardcoded "LIMIT 10" in autoremove.php (backport to 3.2) (#1977)
1 parent eb2cec0 commit 4aeeb61

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/cdash/include/autoremove.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ function removeFirstBuilds($projectid, $days, $maxbuilds, $force = false, $echo
9191

9292
add_log('about to query for builds to remove', 'removeFirstBuilds');
9393
$db = Database::getInstance();
94-
$builds = $db->executePrepared('
94+
$builds = $db->executePrepared("
9595
SELECT id
9696
FROM build
9797
WHERE
9898
parentid IN (0, -1)
9999
AND starttime<?
100100
AND projectid=?
101101
ORDER BY starttime ASC
102-
LIMIT 10
103-
', [$startdate, intval($projectid)]);
102+
LIMIT $maxbuilds
103+
", [$startdate, intval($projectid)]);
104104
add_last_sql_error('dailyupdates::removeFirstBuilds');
105105

106106
$buildids = array();

0 commit comments

Comments
 (0)