Skip to content

Commit 6ccc2dd

Browse files
stonebuzzRom1-B
andauthored
Fix(Reporting): Fix LIMIT clause (#332)
* Fix(Reporting): Fix LIMIT clause * Apply suggestions from code review --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
1 parent 544e40f commit 6ccc2dd

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Fix SQL alias errors for reportVstackbarLifetime chart
1313
- Fix empty `WHERE` clause
14-
- Fix dashbaord error on display
14+
- Fix `limit` clause
15+
- Fix dashboard error on display
1516

1617
## [1.9.2] - 2025-12-02
1718

inc/helpdeskplus.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ public function reportHbarTopcategory($config = [])
664664

665665
//Init delay value
666666
$delay = PluginMreportingCommon::getCriteriaDate('glpi_tickets.date', $config['delay'], $config['randname']);
667-
$limit = isset($_SESSION['mreporting_values']['glpilist_limit']) ? '0, ' . $_SESSION['mreporting_values']['glpilist_limit'] : '0, 20';
667+
$limit = $_SESSION['mreporting_values']['glpilist_limit'] ?? 20;
668668

669669
$query = [
670670
"SELECT" => [
@@ -718,7 +718,7 @@ public function reportHbarTopapplicant($config = [])
718718

719719
//Init delay value
720720
$delay = PluginMreportingCommon::getCriteriaDate('glpi_tickets.date', $config['delay'], $config['randname']);
721-
$limit = isset($_SESSION['mreporting_values']['glpilist_limit']) ? '0, ' . $_SESSION['mreporting_values']['glpilist_limit'] : '0, 20';
721+
$limit = $_SESSION['mreporting_values']['glpilist_limit'] ?? 20;
722722

723723
$query = [
724724
"SELECT" => [

0 commit comments

Comments
 (0)