Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
[TASK] BRK-1266 Fixed namespaces in HeaderInclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Lihs committed Dec 4, 2014
1 parent 5b194b8 commit 6ef66d6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Classes/Utility/HeaderInclusion.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function initializeObject() {
protected function initializeBackend() {

if (!isset($GLOBALS['SOBE']->doc)) {
$GLOBALS['SOBE']->doc = t3lib_div::makeInstance('template');
$GLOBALS['SOBE']->doc = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeInstance('template');
$GLOBALS['SOBE']->doc->backPath = $GLOBALS['BACK_PATH'];
}

Expand Down Expand Up @@ -118,25 +118,23 @@ public function addCSSFile($file, $rel = 'stylesheet', $media = 'all', $title =
* Expand the EXT to a relative path
*
* @param string $filename
* @return relative filename
* @return string Relative filename
*/
public function getFileRelFileName($filename) {

if (substr($filename, 0, 4) == 'EXT:') { // extension
list($extKey, $local) = explode('/', substr($filename, 4), 2);
$filename = '';
if (strcmp($extKey, '') && t3lib_extMgm::isLoaded($extKey) && strcmp($local, '')) {
if (strcmp($extKey, '') && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey) && strcmp($local, '')) {
if(TYPO3_MODE === 'FE') {
$filename = t3lib_extMgm::siteRelPath($extKey) . $local;
$filename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $local;
} else {
$filename = t3lib_extMgm::extRelPath($extKey) . $local;
$filename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey) . $local;
}
}
}

return $filename;
}


}
?>

0 comments on commit 6ef66d6

Please sign in to comment.