[BUGFIX] Fix Non-static method tslib_cObj::getKey() 68/19868/2
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 26 Nov 2012 20:38:23 +0000 (21:38 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Apr 2013 09:00:12 +0000 (11:00 +0200)
Non-static method tslib_cObj::getKey() should
not be called statically

Change-Id: Ic5a8b54db751661a421385bcbccc264e01e958d3
Resolves: #38601
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/16753
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-on: https://review.typo3.org/19868
Reviewed-by: Stefan Neufeind
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index f1e1759..daed129 100644 (file)
@@ -263,7 +263,7 @@ class AbstractMenuContentObject {
                                $this->doktypeExcludeList = $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['excludeDoktypes']);
                        }
                        // EntryLevel
-                       $this->entryLevel = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getKey(isset($conf['entryLevel.']) ? $this->parent_cObj->stdWrap($conf['entryLevel'], $conf['entryLevel.']) : $conf['entryLevel'], $this->tmpl->rootLine);
+                       $this->entryLevel = $this->parent_cObj->getKey(isset($conf['entryLevel.']) ? $this->parent_cObj->stdWrap($conf['entryLevel'], $conf['entryLevel.']) : $conf['entryLevel'], $this->tmpl->rootLine);
                        // Set parent page: If $id not stated with start() then the base-id will be found from rootLine[$this->entryLevel]
                        // Called as the next level in a menu. It is assumed that $this->MP_array is set from parent menu.
                        if ($id) {
@@ -638,7 +638,7 @@ class AbstractMenuContentObject {
                                                $extraWhere .= ' AND pages.no_search=0';
                                        }
                                        // Start point
-                                       $eLevel = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getKey(isset($this->conf['special.']['entryLevel.']) ? $this->parent_cObj->stdWrap($this->conf['special.']['entryLevel'], $this->conf['special.']['entryLevel.']) : $this->conf['special.']['entryLevel'], $this->tmpl->rootLine);
+                                       $eLevel = $this->parent_cObj->getKey(isset($this->conf['special.']['entryLevel.']) ? $this->parent_cObj->stdWrap($this->conf['special.']['entryLevel'], $this->conf['special.']['entryLevel.']) : $this->conf['special.']['entryLevel'], $this->tmpl->rootLine);
                                        $startUid = intval($this->tmpl->rootLine[$eLevel]['uid']);
                                        // Which field is for keywords
                                        $kfield = 'keywords';
@@ -672,8 +672,8 @@ class AbstractMenuContentObject {
                                        if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($begin_end[1])) {
                                                $begin_end[1] = -1;
                                        }
-                                       $beginKey = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getKey($begin_end[0], $this->tmpl->rootLine);
-                                       $endKey = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getKey($begin_end[1], $this->tmpl->rootLine);
+                                       $beginKey = $this->parent_cObj->getKey($begin_end[0], $this->tmpl->rootLine);
+                                       $endKey = $this->parent_cObj->getKey($begin_end[1], $this->tmpl->rootLine);
                                        if ($endKey < $beginKey) {
                                                $endKey = $beginKey;
                                        }