Skip to content

Commit

Permalink
Remove hardcoded "LIMIT 10" in autoremove.php (backport to 3.2) (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackgalbreath authored Jan 26, 2024
1 parent eb2cec0 commit 4aeeb61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/cdash/include/autoremove.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ function removeFirstBuilds($projectid, $days, $maxbuilds, $force = false, $echo

add_log('about to query for builds to remove', 'removeFirstBuilds');
$db = Database::getInstance();
$builds = $db->executePrepared('
$builds = $db->executePrepared("
SELECT id
FROM build
WHERE
parentid IN (0, -1)
AND starttime<?
AND projectid=?
ORDER BY starttime ASC
LIMIT 10
', [$startdate, intval($projectid)]);
LIMIT $maxbuilds
", [$startdate, intval($projectid)]);
add_last_sql_error('dailyupdates::removeFirstBuilds');

$buildids = array();
Expand Down

0 comments on commit 4aeeb61

Please sign in to comment.