@@ -93,15 +93,15 @@ protected static function addAccess(\Aimeos\Base\View\Iface $view) : \Aimeos\Bas
93
93
94
94
if ($ appType && $ appType ->isBackend ()) {
95
95
if ($ t3context ->getPropertyFromAspect ('backend.user ' , 'isAdmin ' , false ) === false ) {
96
- $ ids = $ t3context ->getPropertyFromAspect ('backend.user ' , 'groupIds ' , []);
96
+ $ ids = array_filter ( $ t3context ->getPropertyFromAspect ('backend.user ' , 'groupIds ' , []), fn ( $ id ) => $ id > 0 );
97
97
$ names = $ t3context ->getPropertyFromAspect ('backend.user ' , 'groupNames ' , []);
98
98
$ helper = new \Aimeos \Base \View \Helper \Access \Standard ($ view , array_combine ($ ids , $ names ));
99
99
} else {
100
100
$ helper = new \Aimeos \Base \View \Helper \Access \All ($ view );
101
101
}
102
102
} else {
103
103
if ($ t3context ->getPropertyFromAspect ('frontend.user ' , 'isLoggedIn ' , false )) {
104
- $ ids = $ t3context ->getPropertyFromAspect ('frontend.user ' , 'groupIds ' , []);
104
+ $ ids = array_filter ( $ t3context ->getPropertyFromAspect ('frontend.user ' , 'groupIds ' , []), fn ( $ id ) => $ id > 0 );
105
105
$ names = $ t3context ->getPropertyFromAspect ('frontend.user ' , 'groupNames ' , []);
106
106
$ helper = new \Aimeos \Base \View \Helper \Access \Standard ($ view , array_combine ($ ids , $ names ));
107
107
} else {
@@ -347,6 +347,7 @@ protected static function addUrl(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Con
347
347
}
348
348
349
349
$ fixed = [];
350
+ $ pageId = 0 ;
350
351
351
352
if ($ request && $ request ->getAttribute ('applicationType ' ) === 1 ) { // for frontend requests only
352
353
$ name = $ config ->get ('typo3/param/name/site ' , 'site ' );
@@ -368,9 +369,9 @@ protected static function addUrl(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Con
368
369
if ($ request !== null && $ request ->hasArgument ($ name ) === true ) {
369
370
$ fixed [$ name ] = $ request ->getArgument ($ name );
370
371
}
371
- }
372
372
373
- $ pageId = $ request ? $ request ->getAttribute ('routing ' )->getPageId () : 0 ;
373
+ $ pageId = $ request ->getAttribute ('routing ' )->getPageId ();
374
+ }
374
375
375
376
if ($ uriBuilder instanceof \TYPO3 \CMS \Extbase \Mvc \Web \Routing \UriBuilder) {
376
377
$ url = new \Aimeos \Base \View \Helper \Url \Typo3 ($ view , $ uriBuilder ->setTargetPageUid ( $ pageId ), $ fixed );
0 commit comments