File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,8 @@ public static function hookPostShowTab(array $options) {
747747 }
748748
749749 public static function hookRedefineMenu ($ menus ) {
750+ global $ DB ;
751+
750752 if (Session::getCurrentInterface () != 'helpdesk ' ) {
751753 return $ menus ;
752754 }
@@ -775,7 +777,19 @@ public static function hookRedefineMenu($menus) {
775777 $ newMenu ['reservation ' ] = $ menus ['reservation ' ];
776778 }
777779 }
778- if (RSSFeed::canView ()) {
780+ $ rssFeedTable = RSSFeed::getTable ();
781+ $ criteria = [
782+ 'SELECT ' => "$ rssFeedTable.* " ,
783+ 'DISTINCT ' => true ,
784+ 'FROM ' => $ rssFeedTable ,
785+ 'ORDER ' => "$ rssFeedTable.name "
786+ ];
787+ $ criteria = $ criteria + RSSFeed::getVisibilityCriteria ();
788+ $ criteria ['WHERE ' ]["$ rssFeedTable.users_id " ] = ['<> ' , Session::getLoginUserID ()];
789+ $ iterator = $ DB ->request ($ criteria );
790+ $ hasRssFeeds = $ iterator ->count () > 0 ;
791+
792+ if (RSSFeed::canView () && $ hasRssFeeds ) {
779793 $ newMenu ['feeds ' ] = [
780794 'default ' => Plugin::getWebDir ('formcreator ' , false ) . '/front/wizardfeeds.php ' ,
781795 'title ' => __ ('Consult feeds ' , 'formcreator ' ),
You can’t perform that action at this time.
0 commit comments