From 67cd5364fae107f6433aa9d1d916eab8987a6501 Mon Sep 17 00:00:00 2001 From: Steffen Kamper Date: Thu, 25 Nov 2010 12:07:40 +0000 Subject: [PATCH] Follow-up to #16495: corrected the backpath for imported modules (files) git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9622 709f56b5-9817-0410-a4d7-c38de5d9e867 --- typo3/sysext/em/classes/index.php | 6 ------ .../sysext/em/classes/tools/class.tx_em_tools.php | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/typo3/sysext/em/classes/index.php b/typo3/sysext/em/classes/index.php index 2903f6997cf2..77a5d042246b 100644 --- a/typo3/sysext/em/classes/index.php +++ b/typo3/sysext/em/classes/index.php @@ -275,12 +275,6 @@ class SC_mod_tools_em_index extends t3lib_SCbase { ); - $this->typeBackPaths = array( - 'S' => '../../../', - 'G' => '../../../', - 'L' => '../../../../' . TYPO3_mainDir - ); - $this->script = 'mod.php?M=tools_em'; $this->privacyNotice = $GLOBALS['LANG']->getLL('privacy_notice'); $securityMessage = $GLOBALS['LANG']->getLL('security_warning_extensions') . diff --git a/typo3/sysext/em/classes/tools/class.tx_em_tools.php b/typo3/sysext/em/classes/tools/class.tx_em_tools.php index 7e2214fc7243..c2a702fc4641 100644 --- a/typo3/sysext/em/classes/tools/class.tx_em_tools.php +++ b/typo3/sysext/em/classes/tools/class.tx_em_tools.php @@ -561,6 +561,19 @@ final class tx_em_Tools { } } + /** + * Get backpath from type + * + * @param string $type S/G/L + */ + public function typeBackPath($type) { + if ($type === 'L') { + return '../../../../' . TYPO3_mainDir; + } else { + return '../../../'; + } + } + /** * Reads locallang file into array (for possible include in header) * @@ -913,7 +926,7 @@ final class tx_em_Tools { unset($reg); if (preg_match('/^\$BACK_PATH[[:space:]]*=[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*;/', $line, $reg)) { - $lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . self::typeRelPath($type) . '\';', $lines[$k]); + $lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . self::typeBackPath($type) . '\';', $lines[$k]); $flag_B = $k + 1; } -- 2.20.1