mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Controller: Reset default limit for pdf exports
This commit is contained in:
parent
be7d7c6998
commit
5ff633e96b
1 changed files with 8 additions and 4 deletions
|
|
@ -341,6 +341,14 @@ class Controller extends CompatController
|
|||
return true;
|
||||
}
|
||||
|
||||
// It only makes sense to export a single result to CSV or JSON
|
||||
$query = $queries[0];
|
||||
|
||||
// No matter the format, a limit should only apply if set
|
||||
if ($this->format !== null) {
|
||||
$query->limit(Url::fromRequest()->getParam('limit'));
|
||||
}
|
||||
|
||||
if ($this->format === 'json' || $this->format === 'csv') {
|
||||
$isJsonFormat = $this->format === 'json';
|
||||
$response = $this->getResponse();
|
||||
|
|
@ -369,11 +377,7 @@ class Controller extends CompatController
|
|||
ob_end_clean();
|
||||
Environment::raiseExecutionTime();
|
||||
|
||||
$query = $queries[0];
|
||||
$query->limit(Url::fromRequest()->getParam('limit'));
|
||||
$col = array_merge((array) $query->getModel()->getKeyName(), $query->getModel()->getColumns());
|
||||
$tableName = $query->getModel()->getTableName();
|
||||
|
||||
foreach ($query->getWith() as $relationPath => $relation) {
|
||||
$relatedCols = $relation->getTarget()->getColumns();
|
||||
foreach ($relatedCols as $alias => $name) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue