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) {
747
747
}
748
748
749
749
public static function hookRedefineMenu ($ menus ) {
750
+ global $ DB ;
751
+
750
752
if (Session::getCurrentInterface () != 'helpdesk ' ) {
751
753
return $ menus ;
752
754
}
@@ -775,7 +777,19 @@ public static function hookRedefineMenu($menus) {
775
777
$ newMenu ['reservation ' ] = $ menus ['reservation ' ];
776
778
}
777
779
}
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 ) {
779
793
$ newMenu ['feeds ' ] = [
780
794
'default ' => Plugin::getWebDir ('formcreator ' , false ) . '/front/wizardfeeds.php ' ,
781
795
'title ' => __ ('Consult feeds ' , 'formcreator ' ),
You can’t perform that action at this time.
0 commit comments