Index: typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php
===================================================================
--- typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php (revision 9485)
+++ typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php (revision )
@@ -461,7 +461,7 @@
// Icon:
$imgInfo = @getImageSize(tx_em_Tools::getExtPath($extKey, $extInfo['type']) . '/ext_icon.gif');
if (is_array($imgInfo)) {
- $cells[] = '
| ';
+ $cells[] = ' | ';
} elseif ($extInfo['_ICON']) {
$cells[] = '' . $extInfo['_ICON'] . ' | ';
} else {
@@ -653,7 +653,7 @@
$imgInfo = @getImageSize(tx_em_Tools::getExtPath($name, $data['type']) . '/ext_icon.gif');
if (is_array($imgInfo)) {
- $icon = '';
+ $icon = '';
} elseif ($data['_ICON']) { //TODO: see if this can be removed, seems to be wrong in this context
$icon = $data['_ICON'];
} else {
Index: typo3/sysext/em/classes/index.php
===================================================================
--- typo3/sysext/em/classes/index.php (revision 9485)
+++ typo3/sysext/em/classes/index.php (revision )
@@ -114,12 +114,6 @@
var $typeDescr = array();
var $typeBackPaths = array(); // Also static, set in init()
- var $typeRelPaths = array(
- 'S' => 'sysext/',
- 'G' => 'ext/',
- 'L' => '../typo3conf/ext/',
- );
-
var $detailCols = array(
0 => 2,
1 => 5,
@@ -2391,7 +2385,7 @@
$imgInfo = @getImageSize(tx_em_Tools::getExtPath($extKey, $extInfo['type']) . '/ext_icon.gif');
$out = '';
if (is_array($imgInfo)) {
- $out .= '';
+ $out .= '';
}
$out .= $extInfo['EM_CONF']['title'] ? htmlspecialchars(t3lib_div::fixed_lgd_cs($extInfo['EM_CONF']['title'], 40)) : '' . htmlspecialchars($extKey) . '';
return $out;
Index: typo3/sysext/em/classes/install/class.tx_em_install.php
===================================================================
--- typo3/sysext/em/classes/install/class.tx_em_install.php (revision 9502)
+++ typo3/sysext/em/classes/install/class.tx_em_install.php (revision )
@@ -184,7 +184,7 @@
foreach ($modules as $mD) {
$confFileName = $extDirPath . $mD . '/conf.php';
if (@is_file($confFileName)) {
- $messageContent .= tx_em_Tools::writeTYPO3_MOD_PATH($confFileName, $loc, $extKey . '/' . $mD . '/', $this->parentObject->typeRelPaths, $this->parentObject->typeBackPaths) . '
';
+ $messageContent .= tx_em_Tools::writeTYPO3_MOD_PATH($confFileName, $loc, $extKey . '/' . $mD . '/') . '
';
} else {
$messageContent .= sprintf($GLOBALS['LANG']->getLL('ext_import_no_conf_file'),
$confFileName) . '
';
@@ -954,7 +954,7 @@
if (@is_file($absPath . $mod . '/conf.php')) {
$confFileInfo = $extensionDetails->modConfFileAnalysis($absPath . $mod . '/conf.php');
if (is_array($confFileInfo['TYPO3_MOD_PATH'])) {
- $shouldBePath = $this->typeRelPaths[$extInfo['type']] . $extKey . '/' . $mod . '/';
+ $shouldBePath = tx_em_Tools::typeRelPath($extInfo['type']) . $extKey . '/' . $mod . '/';
if (strcmp($confFileInfo['TYPO3_MOD_PATH'][1][1], $shouldBePath)) {
$infoArray['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_wrong_mod_path'),
$confFileInfo['TYPO3_MOD_PATH'][1][1],
@@ -1113,7 +1113,7 @@
// Initialize:
$absPath = tx_em_Tools::getExtPath($extKey, $extInfo['type']);
- $relPath = $this->parentObject->typeRelPaths[$extInfo['type']] . $extKey . '/';
+ $relPath = tx_em_Tools::typeRelPath($extInfo['type']) . $extKey . '/';
// Look for template file for form:
if (t3lib_extMgm::isLoaded($extKey) && @is_file($absPath . 'ext_conf_template.txt')) {
Index: typo3/sysext/em/classes/tools/class.tx_em_tools.php
===================================================================
--- typo3/sysext/em/classes/tools/class.tx_em_tools.php (revision 9502)
+++ typo3/sysext/em/classes/tools/class.tx_em_tools.php (revision )
@@ -547,6 +547,21 @@
}
/**
+ * Get relative path from type
+ *
+ * @param string $type S/G/L
+ */
+ public function typeRelPath($type) {
+ if ($type === 'S') {
+ return 'sysext/';
+ } elseif ($type === 'G') {
+ return 'ext/';
+ } elseif ($type === 'L') {
+ return '../typo3conf/ext/';
+ }
+ }
+
+ /**
* Reads locallang file into array (for possible include in header)
*
* @param $file
@@ -874,12 +889,10 @@
* @param string Absolute path to a "conf.php" file of the backend module which we want to write back to.
* @param string Install scope type: L, G, S
* @param string Relative path for the module folder in extension
- * @param array Array of relative paths per install scope type
- * @param array Array of back paths per install scope type
* @return string Returns message about the status.
* @see modConfFileAnalysis()
*/
- function writeTYPO3_MOD_PATH($confFilePath, $type, $mP, array $typeRelativePaths, array $typeBackPaths) {
+ function writeTYPO3_MOD_PATH($confFilePath, $type, $mP) {
$lines = explode(LF, t3lib_div::getUrl($confFilePath));
$confFileInfo = array();
$confFileInfo['lines'] = $lines;
@@ -894,13 +907,13 @@
unset($reg);
if (preg_match('/^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;/', $line, $reg)) {
- $lines[$k] = str_replace($reg[0], 'define(\'TYPO3_MOD_PATH\', \'' . $typeRelativePaths[$type] . $mP . '\');', $lines[$k]);
+ $lines[$k] = str_replace($reg[0], 'define(\'TYPO3_MOD_PATH\', \'' . self::typeRelPath($type) . $mP . '\');', $lines[$k]);
$flag_M = $k + 1;
}
unset($reg);
if (preg_match('/^\$BACK_PATH[[:space:]]*=[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*;/', $line, $reg)) {
- $lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . $typeBackPaths[$type] . '\';', $lines[$k]);
+ $lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . self::typeRelPath($type) . '\';', $lines[$k]);
$flag_B = $k + 1;
}