[CLEANUP] Simplify stdWrap handling in Menu cObj 40/35740/3
authorPhilipp Gampe <philipp.gampe@typo3.org>
Fri, 2 Jan 2015 16:19:00 +0000 (17:19 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 2 Jan 2015 19:34:30 +0000 (20:34 +0100)
Follow-up to #46624
Restructure the code to make it more readable.

Resolves: #64088
Releases: master
Change-Id: Ib5bb2bd853fe8bfd0483fbc3df00fa5b9225325a
Reviewed-on: http://review.typo3.org/35740
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 208a837..4380a60 100644 (file)
@@ -386,15 +386,10 @@ class AbstractMenuContentObject {
                                $this->sys_page->where_groupAccess = '';
                        }
 
-                       // additional where clause, usually starts with AND (as usual with all additionalWhere functionality in TS)
-                       if (isset($this->mconf['additionalWhere']) || isset($this->mconf['additionalWhere.'])) {
-                               if (isset($this->mconf['additionalWhere.'])) {
-                                       $additionalWhere = $this->parent_cObj->stdWrap($this->mconf['additionalWhere'], $this->mconf['additionalWhere.']);
-                               } else {
-                                       $additionalWhere = $this->mconf['additionalWhere'];
-                               }
-                       } else {
-                               $additionalWhere = '';
+                       // Additional where clause, usually starts with AND (as usual with all additionalWhere functionality in TS)
+                       $additionalWhere = isset($this->mconf['additionalWhere']) ? $this->mconf['additionalWhere'] : '';
+                       if (isset($this->mconf['additionalWhere.'])) {
+                               $additionalWhere = $this->parent_cObj->stdWrap($additionalWhere, $this->mconf['additionalWhere.']);
                        }
 
                        // Begin production of menu: