From 028c7b21ed2ab4fd46f0d27c4130f7c6bcedec47 Mon Sep 17 00:00:00 2001
From: Markus Klein <klein.t3@mfc-linz.at>
Date: Tue, 18 Feb 2014 10:14:53 +0100
Subject: [PATCH] [BUGFIX] Various static calls to non-static functions

Resolves: #56067
Releases: 6.2, 6.1, 6.0
Change-Id: I6d1e19026afde81bec46cec3dff9060fa6042c43
Reviewed-on: https://review.typo3.org/27679
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
---
 .../Classes/ContentObject/ContentObjectRenderer.php         | 4 ++--
 .../ContentObject/Menu/AbstractMenuContentObject.php        | 6 +++---
 .../ContentObject/Menu/GraphicalMenuContentObject.php       | 2 +-
 .../Classes/ContentObject/Menu/TextMenuContentObject.php    | 2 +-
 .../Classes/Domain/Repository/IndexSearchRepository.php     | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
index ee6249fd1ae3..36be4abfa196 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
@@ -7376,7 +7376,7 @@ class ContentObjectRenderer {
 								$theList = array_merge(
 									GeneralUtility::intExplode(
 										',',
-										self::getTreeList($next_id, $depth - 1, $begin - 1, $dontCheckEnableFields,
+										$this->getTreeList($next_id, $depth - 1, $begin - 1, $dontCheckEnableFields,
 											$addSelectFields, $moreWhereClauses, $prevId_array, $recursionLevel + 1)
 									),
 									$theList
@@ -7586,7 +7586,7 @@ class ContentObjectRenderer {
 		$queryParts = $this->getWhere($table, $conf, TRUE);
 		// Fields:
 		if ($conf['selectFields']) {
-			$queryParts['SELECT'] = self::sanitizeSelectPart($conf['selectFields'], $table);
+			$queryParts['SELECT'] = $this->sanitizeSelectPart($conf['selectFields'], $table);
 		} else {
 			$queryParts['SELECT'] = '*';
 		}
diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
index 347236c8cb22..403944a2f5d2 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
@@ -549,7 +549,7 @@ class AbstractMenuContentObject {
 						$id_list_arr = array();
 						foreach ($items as $id) {
 							$bA = MathUtility::forceIntegerInRange($this->conf['special.']['beginAtLevel'], 0, 100);
-							$id_list_arr[] = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(-1 * $id, $depth - 1 + $bA, $bA - 1);
+							$id_list_arr[] = $this->parent_cObj->getTreeList(-1 * $id, $depth - 1 + $bA, $bA - 1);
 						}
 						$id_list = implode(',', $id_list_arr);
 						// Get sortField (mode)
@@ -605,7 +605,7 @@ class AbstractMenuContentObject {
 							$value_rec = $this->sys_page->getPage($value);
 							$kfieldSrc = $this->conf['special.']['keywordsField.']['sourceField'] ? $this->conf['special.']['keywordsField.']['sourceField'] : 'keywords';
 							// keywords.
-							$kw = trim(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::keywords($value_rec[$kfieldSrc]));
+							$kw = trim($this->parent_cObj->keywords($value_rec[$kfieldSrc]));
 						}
 						// *'auto', 'manual', 'tstamp'
 						$mode = $this->conf['special.']['mode'];
@@ -650,7 +650,7 @@ class AbstractMenuContentObject {
 						// If there are keywords and the startuid is present.
 						if ($kw && $startUid) {
 							$bA = MathUtility::forceIntegerInRange($this->conf['special.']['beginAtLevel'], 0, 100);
-							$id_list = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(-1 * $startUid, $depth - 1 + $bA, $bA - 1);
+							$id_list = $this->parent_cObj->getTreeList(-1 * $startUid, $depth - 1 + $bA, $bA - 1);
 							$kwArr = explode(',', $kw);
 							foreach ($kwArr as $word) {
 								$word = trim($word);
diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
index 366c0b0a06fe..5dcfa518d099 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
@@ -442,7 +442,7 @@ class GraphicalMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\
 						$this->I['A1'] = '';
 						$this->I['A2'] = '';
 					}
-					$this->I['IMG'] = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . $this->I['val']['output_file'] . '" width="' . $this->I['val']['output_w'] . '" height="' . $this->I['val']['output_h'] . '" ' . \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getBorderAttr('border="0"') . ($this->mconf['disableAltText'] ? '' : ' alt="' . htmlspecialchars($this->I['altText']) . '"') . $this->I['name'] . ($this->I['val']['imgParams'] ? ' ' . $this->I['val']['imgParams'] : '') . ' />';
+					$this->I['IMG'] = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . $this->I['val']['output_file'] . '" width="' . $this->I['val']['output_w'] . '" height="' . $this->I['val']['output_h'] . '" ' . $this->parent_cObj->getBorderAttr('border="0"') . ($this->mconf['disableAltText'] ? '' : ' alt="' . htmlspecialchars($this->I['altText']) . '"') . $this->I['name'] . ($this->I['val']['imgParams'] ? ' ' . $this->I['val']['imgParams'] : '') . ' />';
 					// Make before, middle and after parts
 					$this->I['parts'] = array();
 					$this->I['parts']['ATag_begin'] = $this->I['A1'];
diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php
index 417a69a88888..d5359591ae58 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php
@@ -190,7 +190,7 @@ class TextMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\Abstr
 			$theName = $this->imgNamePrefix . $this->I['uid'] . $this->I['INPfix'] . $pref;
 			$name = ' ' . $this->nameAttribute . '="' . $theName . '"';
 			$GLOBALS['TSFE']->imagesOnPage[] = $imgInfo[3];
-			$res = '<img' . ' src="' . $GLOBALS['TSFE']->absRefPrefix . $imgInfo[3] . '"' . ' width="' . $imgInfo[0] . '"' . ' height="' . $imgInfo[1] . '"' . $name . ($this->I['val'][$pref . 'ImgTagParams'] ? ' ' . $this->I['val'][($pref . 'ImgTagParams')] : '') . \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getBorderAttr(' border="0"');
+			$res = '<img' . ' src="' . $GLOBALS['TSFE']->absRefPrefix . $imgInfo[3] . '"' . ' width="' . $imgInfo[0] . '"' . ' height="' . $imgInfo[1] . '"' . $name . ($this->I['val'][$pref . 'ImgTagParams'] ? ' ' . $this->I['val'][($pref . 'ImgTagParams')] : '') . $this->parent_cObj->getBorderAttr(' border="0"');
 			if (!strstr($res, 'alt="')) {
 				// Adding alt attribute if not set.
 				$res .= ' alt=""';
diff --git a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
index d04da4d01fef..4623608a4374 100644
--- a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
+++ b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
@@ -581,7 +581,7 @@ class IndexSearchRepository {
 			$siteIdNumbers = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $this->searchRootPageIdList);
 			$pageIdList = array();
 			foreach ($siteIdNumbers as $rootId) {
-				$pageIdList[] = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(-1 * $rootId, 9999);
+				$pageIdList[] = $GLOBALS['TSFE']->cObj->getTreeList(-1 * $rootId, 9999);
 			}
 			$page_where = ' AND ISEC.page_id IN (' . implode(',', $pageIdList) . ')';
 		}
-- 
GitLab