diff --git a/inc/alert.class.php b/inc/alert.class.php
index 3611966..eaaf1bc 100644
--- a/inc/alert.class.php
+++ b/inc/alert.class.php
@@ -180,10 +180,10 @@ public function rawSearchOptions() {
public static function findAllToNotify($params = []) {
global $DB;
- $p['show_only_login_alerts'] = false;
- $p['show_hidden_alerts'] = false;
- $p['show_helpdesk_alerts'] = false;
- $p['entities_id'] = false;
+ $p['show_only_login_alerts'] = false;
+ $p['show_hidden_alerts'] = false;
+ $p['show_only_helpdesk_alerts'] = false;
+ $p['entities_id'] = false;
foreach ($params as $key => $value) {
$p[$key] = $value;
}
@@ -236,7 +236,7 @@ public static function findAllToNotify($params = []) {
//If the alert must be displayed on helpdesk form : filter by ticket's entity
//and not the current entity
- if ($p['show_helpdesk_alerts']) {
+ if ($p['show_only_helpdesk_alerts']) {
$show_helpdesk_sql = " AND `$table`.`is_displayed_onhelpdesk`='1'";
}
if (!$p['show_only_login_alerts']) {
@@ -416,7 +416,7 @@ public function showForm($ID, $options = []) {
static function displayOnCentral() {
echo "
";
- self::displayAlerts(['show_only_login_alerts' => false]);
+ self::displayAlerts(['show_only_helpdesk_alerts' => Session::getCurrentInterface() == 'helpdesk']);
echo " |
";
}
@@ -430,10 +430,10 @@ static function displayOnLogin() {
static function displayAlerts($params = []) {
global $CFG_GLPI;
- $p['show_only_login_alerts'] = false;
- $p['show_hidden_alerts'] = false;
- $p['show_helpdesk_alerts'] = false;
- $p['entities_id'] = false;
+ $p['show_only_login_alerts'] = false;
+ $p['show_hidden_alerts'] = false;
+ $p['show_only_helpdesk_alerts'] = false;
+ $p['entities_id'] = false;
foreach ($params as $key => $value) {
$p[$key] = $value;
}
@@ -502,9 +502,9 @@ static function preItemForm($params = []) {
$entities_id = isset($params['item']->fields['entities_id'])
? $params['item']->fields['entities_id']
: false; // false to use current entity
- self::displayAlerts(['show_helpdesk_alerts' => true,
- 'show_hidden_alerts' => false,
- 'entities_id' => $entities_id
+ self::displayAlerts(['show_only_helpdesk_alerts' => true,
+ 'show_hidden_alerts' => false,
+ 'entities_id' => $entities_id
]);
echo "";
}
diff --git a/plugin.xml b/plugin.xml
index 483ef52..6507b56 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -53,6 +53,11 @@ Fonctionnalités
TECLIB'
+
+ 1.8.2
+ ~9.5.0
+ https://github.com/pluginsGLPI/news/releases/download/1.8.2/glpi-news-1.8.2.tar.bz2
+
1.8.1
~9.5.0
diff --git a/setup.php b/setup.php
index f826fcd..5c5dcc3 100644
--- a/setup.php
+++ b/setup.php
@@ -21,7 +21,7 @@
--------------------------------------------------------------------------
*/
-define ('PLUGIN_NEWS_VERSION', '1.8.1');
+define ('PLUGIN_NEWS_VERSION', '1.8.2');
// Minimal GLPI version, inclusive
define("PLUGIN_NEWS_MIN_GLPI", "9.5");