Skip to content

Commit

Permalink
Announcements: prevent exit of announcements - refs BT#18151
Browse files Browse the repository at this point in the history
  • Loading branch information
carlangas159 committed Mar 22, 2021
1 parent 2efbec2 commit eefd500
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main/inc/lib/system_announcements.lib.php
Expand Up @@ -971,9 +971,6 @@ public static function displayAnnouncementsSlider($visible, $id = null)
}
}

if (count($announcements) === 0) {
return null;
}
/** Show announcement of group */
$announcementToGroup = self::getAnnouncementsForGroups($userId);
$totalAnnouncementToGroup = count($announcementToGroup);
Expand All @@ -992,6 +989,10 @@ public static function displayAnnouncementsSlider($visible, $id = null)
$announcements[] = $announcementData;
}

if (count($announcements) === 0) {
return null;
}
echo "/*".__LINE__."**/<pre>".var_export($announcementToGroup,true)."</pre><br>";
$template = new Template(null, false, false);
$template->assign('announcements', $announcements);
$layout = $template->get_template('announcement/slider.tpl');
Expand Down

0 comments on commit eefd500

Please sign in to comment.