[TASK] Add tool-function to strip PATH_site-part of paths
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Classes / Controller / IndexedPagesController.php
index 4c99aa9..03a3508 100644 (file)
@@ -871,7 +871,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                        $fullPath = GeneralUtility::getFileAbsFileName($icon);
                        if ($fullPath) {
                                $info = @getimagesize($fullPath);
-                               $iconPath = $GLOBALS['BACK_PATH'] . '../' . substr($fullPath, strlen(PATH_site));
+                               $iconPath = $GLOBALS['BACK_PATH'] . '../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($fullPath);
                                $this->iconFileNameCache[$it] = is_array($info) ? '<img src="' . $iconPath . '" ' . $info[3] . ' title="###TITLE_ATTRIBUTE###" alt="" />' : '';
                        }
                }