|
@@ 1563-1580 (lines=18) @@
|
| 1560 |
|
$phpCodeToCache[] = 'global $TYPO3_CONF_VARS, $T3_SERVICES, $T3_VAR;'; |
| 1561 |
|
$phpCodeToCache[] = ''; |
| 1562 |
|
// Iterate through loaded extensions and add ext_localconf content |
| 1563 |
|
foreach ($extensionInformation as $extensionKey => $extensionDetails) { |
| 1564 |
|
if (isset($extensionDetails['ext_localconf.php']) && $extensionDetails['ext_localconf.php']) { |
| 1565 |
|
// Include a header per extension to make the cache file more readable |
| 1566 |
|
$phpCodeToCache[] = '/**'; |
| 1567 |
|
$phpCodeToCache[] = ' * Extension: ' . $extensionKey; |
| 1568 |
|
$phpCodeToCache[] = ' * File: ' . $extensionDetails['ext_localconf.php']; |
| 1569 |
|
$phpCodeToCache[] = ' */'; |
| 1570 |
|
$phpCodeToCache[] = ''; |
| 1571 |
|
// Set $_EXTKEY and $_EXTCONF for this extension |
| 1572 |
|
$phpCodeToCache[] = '$_EXTKEY = \'' . $extensionKey . '\';'; |
| 1573 |
|
$phpCodeToCache[] = '$_EXTCONF = $GLOBALS[\'TYPO3_CONF_VARS\'][\'EXT\'][\'extConf\'][$_EXTKEY] ?? null;'; |
| 1574 |
|
$phpCodeToCache[] = ''; |
| 1575 |
|
// Add ext_localconf.php content of extension |
| 1576 |
|
$phpCodeToCache[] = trim(file_get_contents($extensionDetails['ext_localconf.php'])); |
| 1577 |
|
$phpCodeToCache[] = ''; |
| 1578 |
|
$phpCodeToCache[] = ''; |
| 1579 |
|
} |
| 1580 |
|
} |
| 1581 |
|
$phpCodeToCache = implode(LF, $phpCodeToCache); |
| 1582 |
|
// Remove all start and ending php tags from content |
| 1583 |
|
$phpCodeToCache = preg_replace('/<\\?php|\\?>/is', '', $phpCodeToCache); |
|
@@ 1823-1839 (lines=17) @@
|
| 1820 |
|
$phpCodeToCache[] = 'global $_EXTKEY;'; |
| 1821 |
|
$phpCodeToCache[] = ''; |
| 1822 |
|
// Iterate through loaded extensions and add ext_tables content |
| 1823 |
|
foreach ($extensionInformation as $extensionKey => $extensionDetails) { |
| 1824 |
|
if (isset($extensionDetails['ext_tables.php']) && $extensionDetails['ext_tables.php']) { |
| 1825 |
|
// Include a header per extension to make the cache file more readable |
| 1826 |
|
$phpCodeToCache[] = '/**'; |
| 1827 |
|
$phpCodeToCache[] = ' * Extension: ' . $extensionKey; |
| 1828 |
|
$phpCodeToCache[] = ' * File: ' . $extensionDetails['ext_tables.php']; |
| 1829 |
|
$phpCodeToCache[] = ' */'; |
| 1830 |
|
$phpCodeToCache[] = ''; |
| 1831 |
|
// Set $_EXTKEY and $_EXTCONF for this extension |
| 1832 |
|
$phpCodeToCache[] = '$_EXTKEY = \'' . $extensionKey . '\';'; |
| 1833 |
|
$phpCodeToCache[] = '$_EXTCONF = $GLOBALS[\'TYPO3_CONF_VARS\'][\'EXT\'][\'extConf\'][$_EXTKEY] ?? null;'; |
| 1834 |
|
$phpCodeToCache[] = ''; |
| 1835 |
|
// Add ext_tables.php content of extension |
| 1836 |
|
$phpCodeToCache[] = trim(file_get_contents($extensionDetails['ext_tables.php'])); |
| 1837 |
|
$phpCodeToCache[] = ''; |
| 1838 |
|
} |
| 1839 |
|
} |
| 1840 |
|
$phpCodeToCache = implode(LF, $phpCodeToCache); |
| 1841 |
|
// Remove all start and ending php tags from content |
| 1842 |
|
$phpCodeToCache = preg_replace('/<\\?php|\\?>/is', '', $phpCodeToCache); |