Skip to content

Commit

Permalink
Controller: Properly reset the default query limit during exports
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Mar 22, 2024
1 parent e311d8b commit 0240cc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Icingadb/Web/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ public function export(Query ...$queries)

// No matter the format, a limit should only apply if set
if ($this->format !== null) {
$query->limit(Url::fromRequest()->getParam('limit'));
if (! Url::fromRequest()->hasParam('limit')) {
$query->limit(null)
->offset(null);
}
}

if ($this->format === 'json' || $this->format === 'csv') {
Expand Down

0 comments on commit 0240cc4

Please sign in to comment.