Skip to content

Commit 52d195e

Browse files
stonebuzzRom1-B
andauthored
Fix(Reporting): Fix LIMIT clause (#331)
* Fix(Reporting): Fix LIMIT clause * Update inc/helpdeskplus.class.php * refactor Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * refactor Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
1 parent 78ce706 commit 52d195e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

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

1010
### Fixed
1111

12-
- Fix missing attachment from notification
12+
- Fix missing attachment from notification
13+
- Fix `limit` clause
1314

1415
## [1.8.10] - 2025-12-05
1516

inc/helpdeskplus.class.php

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

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

666666
$query = [
667667
"SELECT" => [
@@ -715,7 +715,7 @@ public function reportHbarTopapplicant($config = [])
715715

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

720720
$query = [
721721
"SELECT" => [

0 commit comments

Comments
 (0)