Skip to content

Commit 9f37232

Browse files
committed
Merge branch 'release/1.8.2'
2 parents fe00eba + 7aed1d2 commit 9f37232

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

inc/alert.class.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ public function rawSearchOptions() {
180180
public static function findAllToNotify($params = []) {
181181
global $DB;
182182

183-
$p['show_only_login_alerts'] = false;
184-
$p['show_hidden_alerts'] = false;
185-
$p['show_helpdesk_alerts'] = false;
186-
$p['entities_id'] = false;
183+
$p['show_only_login_alerts'] = false;
184+
$p['show_hidden_alerts'] = false;
185+
$p['show_only_helpdesk_alerts'] = false;
186+
$p['entities_id'] = false;
187187
foreach ($params as $key => $value) {
188188
$p[$key] = $value;
189189
}
@@ -236,7 +236,7 @@ public static function findAllToNotify($params = []) {
236236

237237
//If the alert must be displayed on helpdesk form : filter by ticket's entity
238238
//and not the current entity
239-
if ($p['show_helpdesk_alerts']) {
239+
if ($p['show_only_helpdesk_alerts']) {
240240
$show_helpdesk_sql = " AND `$table`.`is_displayed_onhelpdesk`='1'";
241241
}
242242
if (!$p['show_only_login_alerts']) {
@@ -416,7 +416,7 @@ public function showForm($ID, $options = []) {
416416

417417
static function displayOnCentral() {
418418
echo "<tr><th colspan='2'>";
419-
self::displayAlerts(['show_only_login_alerts' => false]);
419+
self::displayAlerts(['show_only_helpdesk_alerts' => Session::getCurrentInterface() == 'helpdesk']);
420420
echo "</th></tr>";
421421
}
422422

@@ -430,10 +430,10 @@ static function displayOnLogin() {
430430
static function displayAlerts($params = []) {
431431
global $CFG_GLPI;
432432

433-
$p['show_only_login_alerts'] = false;
434-
$p['show_hidden_alerts'] = false;
435-
$p['show_helpdesk_alerts'] = false;
436-
$p['entities_id'] = false;
433+
$p['show_only_login_alerts'] = false;
434+
$p['show_hidden_alerts'] = false;
435+
$p['show_only_helpdesk_alerts'] = false;
436+
$p['entities_id'] = false;
437437
foreach ($params as $key => $value) {
438438
$p[$key] = $value;
439439
}
@@ -502,9 +502,9 @@ static function preItemForm($params = []) {
502502
$entities_id = isset($params['item']->fields['entities_id'])
503503
? $params['item']->fields['entities_id']
504504
: false; // false to use current entity
505-
self::displayAlerts(['show_helpdesk_alerts' => true,
506-
'show_hidden_alerts' => false,
507-
'entities_id' => $entities_id
505+
self::displayAlerts(['show_only_helpdesk_alerts' => true,
506+
'show_hidden_alerts' => false,
507+
'entities_id' => $entities_id
508508
]);
509509
echo "</br>";
510510
}

plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ Fonctionnalités
5353
<author>TECLIB'</author>
5454
</authors>
5555
<versions>
56+
<version>
57+
<num>1.8.2</num>
58+
<compatibility>~9.5.0</compatibility>
59+
<download_url>https://github.com/pluginsGLPI/news/releases/download/1.8.2/glpi-news-1.8.2.tar.bz2</download_url>
60+
</version>
5661
<version>
5762
<num>1.8.1</num>
5863
<compatibility>~9.5.0</compatibility>

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
--------------------------------------------------------------------------
2222
*/
2323

24-
define ('PLUGIN_NEWS_VERSION', '1.8.1');
24+
define ('PLUGIN_NEWS_VERSION', '1.8.2');
2525

2626
// Minimal GLPI version, inclusive
2727
define("PLUGIN_NEWS_MIN_GLPI", "9.5");

0 commit comments

Comments
 (0)