';
+ if ($this->versionNumber >= 4003000 && !t3lib_extMgm::isLoaded('statictemplates')) {
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+ '*',
+ 'sys_refindex',
+ 'ref_table = "static_template" AND tablename != "static_template" AND deleted=0'
+ );
+ if ($GLOBALS['TYPO3_DB']->sql_num_rows($rows)) {
+ $description .= 'Dependencies found! You MUST install the extenion "statictemplates"!';
+ return true;
+ }
+ else {
+ $description .= 'No Dependencies found! You may use the COMPARE - Tool to delete the static_template table.';
+ }
+ }
+ return false;
+ }
+
+ /**
+ * second step: get user info
+ *
+ * @param string input prefix, all names of form fields have to start with this. Append custom name in [ ... ]
+ * @return string HTML output
+ */
+ public function getUserInput($inputPrefix) {
+ $content = 'Install the system extension You are about to install the extension "statictemplates". Make sure it is available in the TYPO3 source.';
+
+ return $content;
+ }
+
+ /**
+ * performs the action of the UpdateManager
+ *
+ * @param array &$dbQueries: queries done in this update
+ * @param mixed &$customMessages: custom messages
+ * @return bool whether everything went smoothly or not
+ */
+ function performUpdate(&$dbQueries, &$customMessages) {
+ if ($this->versionNumber >= 4003000 && !t3lib_extMgm::isLoaded('statictemplates')) {
+ // check wether the table can be truncated or if sysext with tca has to be installed
+ if ($this->checkForUpdate($customMessages[])) {
+ $localconf = $this->pObj->writeToLocalconf_control();
+ $this->pObj->setValueInLocalconfFile($localconf, '$TYPO3_CONF_VARS[\'EXT\'][\'extList\']', $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] . ',statictemplates');
+ $message = $this->pObj->writeToLocalconf_control($localconf);
+ if ($message == 'continue') {
+ $customMessages[] = 'System Extension "statictemplates" was succesfully loaded, static templates are now supported.';
+ return true;
+ }
+ else {
+ return false; // something went wrong
+ }
+ }
+ return true;
+ }
+ }
+}
+?>
\ No newline at end of file
Index: typo3/sysext/install/ext_localconf.php
===================================================================
--- typo3/sysext/install/ext_localconf.php (revision 6392)
+++ typo3/sysext/install/ext_localconf.php (working copy)
@@ -29,4 +29,8 @@
// install versioning since TYPO3 4.3
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['installVersioning'] = 'tx_coreupdates_installversioning';
+ // add static_template if needed (since TYPO3 4.3 this table is not standard)
+ // if needed, sysext statictables is loaded, which gives back functionality
+$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['checkForStaticTypoScriptTemplates'] = 'tx_coreupdates_statictemplates';
+
?>