Bug #22904 ยป addUpdateWizards.diff
typo3/sysext/install/mod/class.tx_install.php (Arbeitskopie) | ||
---|---|---|
require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_installnewsysexts.php');
|
||
require_once(t3lib_extMgm::extPath('install') . 'mod/class.tx_install_session.php');
|
||
require_once(t3lib_extMgm::extPath('install') . 'updates/class.tx_coreupdates_statictemplates.php');
|
||
require_once(t3lib_extMgm::extPath('install') . 'updates/class.tx_coreupdates_t3skin.php');
|
||
require_once(t3lib_extMgm::extPath('install') . 'updates/class.tx_coreupdates_compressionlevel.php');
|
||
/**
|
||
* Install Tool module
|
typo3/sysext/install/updates/class.tx_coreupdates_compressionlevel.php (Revision 0) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2010-2010 Steffen Ritter (info@rs-websystems.de)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* Contains the update class checking against configured compressionlevel. Used by the update wizard in the install tool.
|
||
*
|
||
* @author Steffen Ritter <info@rs-websystems.de>
|
||
*/
|
||
class tx_coreupdates_compressionlevel {
|
||
public $versionNumber; // version number coming from t3lib_div::int_from_ver()
|
||
public $pObj; // parent object (tx_install)
|
||
public $userInput; // user input
|
||
/**
|
||
* Checks if there there is an compression level configured which may break the BE.
|
||
*
|
||
* @param string &$description: The description for the update
|
||
* @return boolean whether an update is needed (true) or not (false)
|
||
*/
|
||
public function checkForUpdate(&$description) {
|
||
$description = '<strong>Check for TYPO3_CONF_VARS[BE][compressionLevel] > 0</strong><br />
|
||
This updater checks if you have set an compression level for TYPO3 Backend at your installation. TYPO3 4.4 introduces automatic gzip compression for JavaScript and CSS Stylessheets.<br />
|
||
You\'ll need to include the lines from misc/advanced.htaccess in order to prevent your Backend from stop working.<br /><br />';
|
||
if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']) > 0) {
|
||
$description .= '<strong style="color:#f00">Warning! TYPO3_CONF_VARS[BE][compressionLevel]. The backend may be unuseable!</strong>';
|
||
return TRUE;
|
||
|
||
}
|
||
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 = '<strong>You manually have tu ensure that your Webserver is configured to deal with gzipped JS and CSS</strong><br />Consult misc/advanced.htaccess for ideas.';
|
||
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
|
||
*/
|
||
public function performUpdate(array &$dbQueries, &$customMessages) {
|
||
$customMessages[] = 'Cannot automatically fix this problem! Please check manually.';
|
||
return FALSE;
|
||
}
|
||
}
|
||
?>
|
typo3/sysext/install/updates/class.tx_coreupdates_t3skin.php (Revision 0) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2010-2010 Steffen Ritter (info@rs-websystems.de)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* Contains the update class for not installed t3skin. Used by the update wizard in the install tool.
|
||
*
|
||
* @author Steffen Ritter <info@rs-websystems.de>
|
||
*/
|
||
class tx_coreupdates_t3skin {
|
||
public $versionNumber; // version number coming from t3lib_div::int_from_ver()
|
||
public $pObj; // parent object (tx_install)
|
||
public $userInput; // user input
|
||
/**
|
||
* Checks if t3skin is not installed.
|
||
*
|
||
* @param string &$description: The description for the update
|
||
* @return boolean whether an update is needed (true) or not (false)
|
||
*/
|
||
public function checkForUpdate(&$description) {
|
||
$description = '<strong>Check for skinning extensions t3skin loaded</strong><br />
|
||
This updater checks if you are not using the the default TYPO3 Skin "t3skin". Since in TYPO3 4.4 many changes in Skinning API, HTML-Code/CSS-Code Structure and IconHandling took place, old skins won\'t apply anymore.<br />
|
||
Furthermore with TYPO3 4.4 the "oldskin" which has been present after removing t3skin completely has been removed.<br /><br />';
|
||
if (!t3lib_extMgm::isLoaded('t3skin')) {
|
||
$description .= '<strong style="color:#f00">Warning! t3skin Extension is not installed. The backend may be unuseable!</strong>';
|
||
return TRUE;
|
||
|
||
}
|
||
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 = '<strong>Install the system extension</strong><br />You are about to install the extension "t3skin". 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
|
||
*/
|
||
public function performUpdate(array &$dbQueries, &$customMessages) {
|
||
if ($this->versionNumber >= 4004000 && !t3lib_extMgm::isLoaded('t3skin')) {
|
||
// 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'] . ',t3skin');
|
||
$message = $this->pObj->writeToLocalconf_control($localconf);
|
||
if ($message == 'continue') {
|
||
$customMessages[] = 'System Extension "t3skin" was succesfully loaded.';
|
||
return TRUE;
|
||
} else {
|
||
return FALSE; // something went wrong
|
||
}
|
||
}
|
||
return TRUE;
|
||
}
|
||
}
|
||
}
|
||
?>
|
typo3/sysext/install/ext_localconf.php (Arbeitskopie) | ||
---|---|---|
// 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)
|
||
// add static_template if needed (since TYPO3 4.4 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';
|
||
// warn for t3skin installed in Version 4.4
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['checkForT3SkinInstalled'] = 'tx_coreupdates_t3skin';
|
||
// Version 4.4: warn for set CompressionLevel and warn user to update his .htaccess
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['checkForCompressionLevel'] = 'tx_coreupdates_compressionlevel';
|
||
?>
|