File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
components/com_tags/src/Service Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,8 @@ protected function buildLookup()
363363 $ items = $ this ->app ->getMenu ()->getItems (['component_id ' ], [$ component ->id ]);
364364
365365 foreach ($ items as $ item ) {
366+ $ itemParams = $ item ->getParams ();
367+
366368 if (!isset ($ this ->lookup [$ item ->language ])) {
367369 $ this ->lookup [$ item ->language ] = ['tags ' => [], 'tag ' => []];
368370 }
@@ -372,8 +374,11 @@ protected function buildLookup()
372374 sort ($ id );
373375 $ this ->lookup [$ item ->language ]['tag ' ][implode (', ' , $ id )] = $ item ->id ;
374376
375- foreach ($ id as $ i ) {
376- $ this ->lookup [$ item ->language ]['tag ' ][$ i ] = $ item ->id ;
377+ // Only apply to menu items with match type any
378+ if ($ itemParams ->get ('return_any_or_all ' ) == 1 ) {
379+ foreach ($ id as $ i ) {
380+ $ this ->lookup [$ item ->language ]['tag ' ][$ i ] = $ item ->id ;
381+ }
377382 }
378383 }
379384
You can’t perform that action at this time.
0 commit comments