From 50e8ff2de55b2ba710661f1dc977987689688959 Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Tue, 23 Nov 2021 13:56:38 -0500 Subject: [PATCH] Change log & phpcs --- CHANGELOG.md | 1 + modules/bvl_feedback/php/module.class.inc | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d6f16e4c4..918e1438d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,6 +121,7 @@ multi-echo aquisitions (PR #7515). from the `psc` table. The default value of `CenterID` is `NULL`. Previously, the default for `Center_name` was `AAAA` or `ZZZZ`. (PR #7525) - The statistics displayed in the dashboard was changed to only show the data relevant to the user's site(s). (PR #8132) +- BVL Feedback widget only shows notifications for the users sites / projects (PR #7848) #### Bug Fixes - A LINST instrument Date field name now appears correctly (not truncated) on the diff --git a/modules/bvl_feedback/php/module.class.inc b/modules/bvl_feedback/php/module.class.inc index 47760c148f0..c02c9351f4d 100644 --- a/modules/bvl_feedback/php/module.class.inc +++ b/modules/bvl_feedback/php/module.class.inc @@ -79,18 +79,18 @@ class Module extends \Module // Add centerID restriction if needed if (!$user->hasPermission('access_all_profiles')) { - $site_arr = implode(",",$user->getCenterIDs()); - $query .= " AND s.CenterID IN ({$site_arr}) "; + $site_arr = implode(",", $user->getCenterIDs()); + $query .= " AND s.CenterID IN ({$site_arr}) "; } // Add project restriction & order BY - $project_arr = implode(",",$user->getProjectIDs()); - $query .= " AND s.ProjectID IN ({$project_arr}) + $project_arr = implode(",", $user->getProjectIDs()); + $query .= " AND s.ProjectID IN ({$project_arr}) ORDER BY Testdate DESC LIMIT 4"; - $bvl_feedback = $DB->pselect( + $bvl_feedback = $DB->pselect( $query, - array() + [] ); $frontend_feedback = [];