Feature #17672 ยป compatversion_improvements_v2.diff
t3lib/class.t3lib_extmgm.php (Arbeitskopie) | ||
---|---|---|
if (intval($TYPO3_CONF_VARS['EXT']['extCache'])==1) $cacheFilePrefix.= '_ps'.substr(t3lib_div::shortMD5(PATH_site.'|'.$GLOBALS['TYPO_VERSION']),0,4);
|
||
if (intval($TYPO3_CONF_VARS['EXT']['extCache'])==2) $cacheFilePrefix.= '_'.t3lib_div::shortMD5($rawExtList);
|
||
// If cache files available, set cache file prefix and return:
|
||
if ($TYPO3_CONF_VARS['EXT']['extCache'] && t3lib_extMgm::isCacheFilesAvailable($cacheFilePrefix)) {
|
||
// If cache files available, set cache file prefix and return.
|
||
// Always disable caching while in Install Tool!
|
||
if ($TYPO3_CONF_VARS['EXT']['extCache'] && t3lib_extMgm::isCacheFilesAvailable($cacheFilePrefix) && !TYPO3_enterInstallScript) {
|
||
// Return cache file prefix:
|
||
$extensions['_CACHEFILE'] = $cacheFilePrefix;
|
||
} else { // ... but if not, configure...
|
typo3/sysext/cms/ext_localconf.php (Arbeitskopie) | ||
---|---|---|
$TYPO3_CONF_VARS['SYS']['contentTable'] = 'tt_content';
|
||
$TYPO3_CONF_VARS['FE']['eID_include']['tx_cms_showpic'] = 'EXT:cms/tslib/showpic.php';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['cms'] = array(
|
||
'title' => 'CMS Frontend',
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['cms_simulateStaticDocuments'] = array(
|
||
'title' => 'CMS Frontend: Change word separator in links when using simulateStaticDocuments',
|
||
'version' => 4000000,
|
||
'description' => '<ul>' .
|
||
'<li><p>Word separator character for simulateStaticDocument is changed from ' .
|
||
'underscore (_) to hyphen (-) to make URLs more friendly for search engines' .
|
||
'URLs that are already existing (e.g. external links to your site) will still work like before.</p>' .
|
||
'<p>You can set the separator character back to an underscore by putting the following line into the '.
|
||
'<b>Setup</b> section of your Page TypoScript template:</p>' .
|
||
'<p style="margin-top: 5px; white-space: nowrap;"><code>config.simulateStaticDocuments_replacementChar = _</code></p></li>'.
|
||
'<li><p>CSS Stylesheets and JavaScript are put into an external file by default.</p>'.
|
||
'<p>Technically, that means that the default value of "config.inlineStyle2TempFile" is now set to "1" and that of "config.removeDefaultJS" to "external"</p></li>'.
|
||
'</ul>',
|
||
'description' => '<p>Word separator character for simulateStaticDocument is changed from underscore (_) to hyphen (-) to make URLs more friendly for search engines URLs that are already existing (e.g. external links to your site) will still work like before.</p>' .
|
||
'<p>You can set the separator character back to an underscore by putting the following line into the <b>Setup</b> section of your Page TypoScript template:</p>' .
|
||
'<p style="margin-top: 5px; white-space: nowrap;"><code>config.simulateStaticDocuments_replacementChar = _</code></p>',
|
||
);
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['cms_externalCSSandJS'] = array(
|
||
'title' => 'CMS Frontend: Move CSS Stylesheets and JavaScript into external files',
|
||
'version' => 4000000,
|
||
'description' => '<p>CSS Stylesheets and JavaScript are put into an external file by default.</p>' .
|
||
'<p>Technically, that means that the default value of "config.inlineStyle2TempFile" is now set to "1" and that of "config.removeDefaultJS" to "external"</p>',
|
||
);
|
||
?>
|
typo3/sysext/install/mod/class.tx_install.php (Arbeitskopie) | ||
---|---|---|
function updateWizard() {
|
||
global $TYPO3_CONF_VARS;
|
||
// clear cache files
|
||
t3lib_extMgm::removeCacheFiles();
|
||
// generate new cache files and include them
|
||
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] = 1;
|
||
$TYPO3_LOADED_EXT = t3lib_extMgm::typo3_loadExtensions();
|
||
if ($TYPO3_LOADED_EXT['_CACHEFILE']) {
|
||
require(PATH_typo3conf.$TYPO3_LOADED_EXT['_CACHEFILE'].'_ext_localconf.php');
|
||
}
|
||
// call wizard
|
||
$action = ($this->INSTALL['database_type']?$this->INSTALL['database_type']:'checkForUpdate');
|
||
$this->updateWizard_parts($action);
|
||
... | ... | |
$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
|
||
if (method_exists($tmpObj,'checkForUpdate')) {
|
||
$explanation = '';
|
||
if ($tmpObj->checkForUpdate($explanation)) {
|
||
$updateWizardBoxes.= '
|
||
$isUpToDate = $tmpObj->checkForUpdate($explanation);
|
||
if ($isUpToDate) {
|
||
$buttonLabel = 'Downgrade';
|
||
} else {
|
||
$buttonLabel = 'Next';
|
||
}
|
||
$updateWizardBoxes.= '
|
||
<div style="border: 1px solid; padding: 10px; margin: 10px; padding-top: 0px; width: 400px;">
|
||
<h3>'.$identifier.'</h3>
|
||
<p>'.str_replace(chr(10),'<br />',$explanation).'</p>
|
||
<input type="submit" name="TYPO3_INSTALL[update]['.$identifier.']" id="TYPO3_INSTALL[update]['.$identifier.']" value="Next" />
|
||
<p>'.$explanation.'</p>
|
||
<input type="submit" name="TYPO3_INSTALL[update]['.$identifier.']" id="TYPO3_INSTALL[update]['.$identifier.']" value="'.$buttonLabel.'" />
|
||
</div>';
|
||
}
|
||
}
|
||
}
|
||
typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php (Arbeitskopie) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2006 Sebastian Kurfuerst (sebastian@garbage-group.de)
|
||
* (c) 1999-2007 Sebastian Kurfuerst (sebastian@garbage-group.de)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
... | ... | |
* Function which checks if update is needed. Called in the beginning of an update process.
|
||
*
|
||
* @param string pointer to description for the update
|
||
* @return boolean true if update is needs to be performed, false otherwise.
|
||
* @return boolean true if system is up to date, false otherwise
|
||
*/
|
||
function checkForUpdate(&$description) {
|
||
global $TYPO3_CONF_VARS;
|
||
$isUpToDate = false;
|
||
if ($this->compatVersionIsCurrent()) {
|
||
$description = '<strong>Up to date!</strong><br />If you do not use the wizard, your current TYPO3 installation is configured to use all the features included in the current release '.TYPO3_version.'.<br />
|
||
There are two possibilities that you see this screen:<ol><li><b>You just updated from a previous version of TYPO3:</b>
|
||
Because of some new features, the frontend output of your site might have changed. To emulate the "old" frontend behavior, change the compatibility version by continuing to step 2.
|
||
This is <b>recommended</b> after every update to make sure the frontend output is not altered. When re-running the wizard, you will see the changes needed for using the new features.
|
||
<i>Please continue to step two.</i></li>
|
||
<li><b>You just made a fresh install of TYPO3:</b>
|
||
Perfect! All new features will be used.
|
||
<i>You can stop here and do not need this wizard now.</i></li></ol>';
|
||
$description = '<p><strong>Up to date!</strong><br />This TYPO3 installation is configured to use all the features included in the current version '.TYPO3_branch.'.</p>'.
|
||
'<p>If you have <strong>upgraded</strong> from a previous version, you might however wish to <strong>revert</strong> some of these features and let TYPO3 behave like an older version.</p>';
|
||
$isUpToDate = true;
|
||
if (!$TYPO3_CONF_VARS['SYS']['compat_version']) {
|
||
$description .= '
|
||
The compatibility version has been set to the current TYPO3 version. This is a stamp and has no impact for your installation.';
|
||
} else {
|
||
$description = '<p>Your current TYPO3 installation is configured to <strong>behave like version '.$TYPO3_CONF_VARS['SYS']['compat_version'].'</strong> of TYPO3.<br />However, this is <strong>TYPO3 version '.TYPO3_branch.'</strong>, and it probably provides some new features which are currently not enabled in your installation:</p>' . $this->showChangesNeeded_short();
|
||
if ($TYPO3_CONF_VARS['SYS']['compat_version']=='3.8') { // default value which is set in t3lib/config_default.php
|
||
$description.= '<p>If you have come to this point after setting up a <strong>fresh TYPO3 installation</strong>, you can simply ignore all these notes and <strong>proceed</strong> update the compatibility version on the next page!</p>';
|
||
}
|
||
} else {
|
||
$description = 'Your current TYPO3 installation is configured to <b>behave like version '.$TYPO3_CONF_VARS['SYS']['compat_version'].'</b> of TYPO3. If you just upgraded from this version, you most likely want to <b>use new features</b> as well.</p><p>In the next step, you will see the things that need to be adjusted to make your installation compatible with the new features.';
|
||
$description.= '<p>Click the button below to get a list of what needs to be adjusted to make your installation compatible with these changes.</p>';
|
||
}
|
||
return 1; // Return 1 in any case so user has possibility to switch back to a previous compat_version.
|
||
return $isUpToDate;
|
||
}
|
||
/**
|
||
... | ... | |
function getUserInput($inputPrefix) {
|
||
global $TYPO3_CONF_VARS;
|
||
if ($this->compatVersionIsCurrent()) {
|
||
$content = '<strong>You updated from an older version of TYPO3</strong>:<br />
|
||
<label for="'.$inputPrefix.'[version]">Select the version where you have upgraded from:</label> <select name="'.$inputPrefix.'[version]" id="'.$inputPrefix.'[version]">';
|
||
$versions = array(
|
||
'3.8' => '<= 3.8'
|
||
);
|
||
foreach ($versions as $singleVersion => $caption) {
|
||
$content .= '<option value="'.$singleVersion.'">'.$caption.'</option>';
|
||
$content = '<p>This version is configured to behave like TYPO3 '.TYPO3_branch.'.<br />'.
|
||
'In case that this causes problems (e.g. after upgrading to a new TYPO3 version) you most likely want to set the value back to version number where you have upgraded from.</p>'.
|
||
'<p><label for="'.$inputPrefix.'[version]">You can specify the target version in the field below:</label></p>'.
|
||
'<p><select name="'.$inputPrefix.'[version]" id="'.$inputPrefix.'[version]">';
|
||
$versions = array('3.8','4.0','4.1');
|
||
foreach ($versions as $singleVersion) {
|
||
$content.= '<option value="'.$singleVersion.'">TYPO3 '.$singleVersion.'</option>';
|
||
}
|
||
$content .= '</select>';
|
||
$content.= '</select></p>';
|
||
} else {
|
||
$content = 'TYPO3 output is currently compatible to version '.$TYPO3_CONF_VARS['SYS']['compat_version'].'. To use all the new features in the current TYPO3 version, make sure you follow the guidelines below to upgrade without problems.<br />
|
||
<p><strong>Follow the steps below carefully and confirm every step!</strong><br />You will see this list again after you performed the update.</p>';
|
||
$content .= $this->showChangesNeeded($inputPrefix);
|
||
$content.= $this->showChangesNeeded($inputPrefix);
|
||
$content.= '<p><input type="checkbox" name="'.$inputPrefix.'[compatVersion][all]" id="'.$inputPrefix.'[compatVersion][all]" value="1"> <strong><label for="'.$inputPrefix.'[compatVersion][all]">Check all (ignore selection above)<br />WARNING: this might break the output of your website.</label></strong></p><hr />';
|
||
}
|
||
... | ... | |
if ($details['version'] > $oldVersion && $details['version'] <= $currentVersion) {
|
||
if (!$this->userInput['compatVersion'][$internalName]) {
|
||
$performUpdate = 0;
|
||
$customMessages = 'If you want to update the compatibility version, you need to confirm all checkboxes on the previous page.';
|
||
$customMessages = 'If you want to update the compatibility version, you need to <strong>confirm all checkboxes</strong> on the previous page.';
|
||
break;
|
||
}
|
||
}
|
||
... | ... | |
*/
|
||
function performUpdate(&$dbQueries, &$customMessages) {
|
||
$customMessages = '';
|
||
// if we just set it to an older version
|
||
if ($this->userInput['version']) {
|
||
$customMessages .= 'If you want to see what you need to do to use the new features, run the update wizard again!';
|
||
}
|
||
$linesArr = $this->pObj->writeToLocalconf_control();
|
||
$version = $this->userInput['version'] ? $this->userInput['version'] : TYPO3_branch;
|
||
$this->pObj->setValueInLocalconfFile($linesArr, '$TYPO3_CONF_VARS["SYS"]["compat_version"]', $version);
|
||
$this->pObj->setValueInLocalconfFile($linesArr, '$TYPO3_CONF_VARS[\'SYS\'][\'compat_version\']', $version);
|
||
$this->pObj->writeToLocalconf_control($linesArr,0);
|
||
$customMessages.= '<br />The compatibility version has been set to '.$version.'.';
|
||
... | ... | |
* @param string input prefix to prepend all form fields with.
|
||
* @return string HTML output
|
||
*/
|
||
function showChangesNeeded($inputPrefix = '') {
|
||
function showChangesNeeded($inputPrefix='') {
|
||
global $TYPO3_CONF_VARS;
|
||
$oldVersion = t3lib_div::int_from_ver($TYPO3_CONF_VARS['SYS']['compat_version']);
|
||
$currentVersion = t3lib_div::int_from_ver(TYPO3_branch);
|
||
... | ... | |
$updateWizardBoxes = '';
|
||
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'] as $internalName => $details) {
|
||
if ($details['version'] > $oldVersion && $details['version'] <= $currentVersion) {
|
||
$description = str_replace(chr(10),'<br />',$details['description']);
|
||
$description_acknowledge = (isset($details['description_acknowledge']) ? str_replace(chr(10),'<br />',$details['description_acknowledge']) : '');
|
||
$title = isset($details['title']) ? $details['title'] : $internalName;
|
||
$description = $details['description'];
|
||
$description_acknowledge = (isset($details['description_acknowledge']) ? $details['description_acknowledge'] : '');
|
||
$updateWizardBoxes.= '
|
||
<div style="border: 1px solid; padding: 10px; margin: 10px; padding-top: 0px; width: 500px;">
|
||
<h3>'.(isset($details['title'])?$details['title']:$internalName).'</h3>
|
||
<h3>'.$title.'</h3>
|
||
<p>'.$description.'</p>'.
|
||
(strlen($description_acknowledge) ? '<p>'.$description_acknowledge.'</p>' : '').
|
||
(strlen($inputPrefix) ? '<p><input type="checkbox" name="'.$inputPrefix.'[compatVersion]['.$internalName.']" id="'.$inputPrefix.'[compatVersion]['.$internalName.']" value="1"> <strong><label for="'.$inputPrefix.'[compatVersion]['.$internalName.']">Acknowledged</label></strong></p>' : '').'
|
||
... | ... | |
}
|
||
return '';
|
||
}
|
||
/**
|
||
* Show a summary of all changes needed (only titles, no descriptions)
|
||
*
|
||
* @return string HTML output
|
||
*/
|
||
function showChangesNeeded_short() {
|
||
global $TYPO3_CONF_VARS;
|
||
$oldVersion = t3lib_div::int_from_ver($TYPO3_CONF_VARS['SYS']['compat_version']);
|
||
$currentVersion = t3lib_div::int_from_ver(TYPO3_branch);
|
||
$contentArr = array();
|
||
if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'])) {
|
||
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'] as $internalName => $details) {
|
||
if ($details['version'] > $oldVersion && $details['version'] <= $currentVersion) {
|
||
$title = isset($details['title']) ? $details['title'] : $internalName;
|
||
$contentArr[] = '<li><p>'.$title.'</p></li>';
|
||
}
|
||
}
|
||
}
|
||
if (!count($contentArr)) {
|
||
$contentArr[] = '<li>This version doesn\'t introduce any new features at all. There is no need to update the compatibility version this time...</li>';
|
||
}
|
||
$output = '<ul>'.implode('',$contentArr).'</ul>';
|
||
return $output;
|
||
}
|
||
}
|
||
?>
|
typo3/sysext/install/ext_localconf.php (Arbeitskopie) | ||
---|---|---|
if (!defined ('TYPO3_MODE')) die ('Access denied.');
|
||
require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_compatversion.php');
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['changeCompatibilityVersion'] = 'tx_coreupdates_compatversion';
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['Change compatibility version'] = 'tx_coreupdates_compatversion';
|
||
// not used yet
|
||
//require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_notinmenu.php');
|
||
//$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['notInMenu_doctype_conversion'] = 'tx_coreupdates_notinmenu';
|
||
//$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['Update notInMenu document types'] = 'tx_coreupdates_notinmenu';
|
||
?>
|
typo3/sysext/css_styled_content/ext_localconf.php (Arbeitskopie) | ||
---|---|---|
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_accessibility'] = array(
|
||
'title' => 'CSS Styled Content: Accessibility improvements',
|
||
'version' => 3009000,
|
||
'version' => 4000000,
|
||
'description' => '<p>The rendering of the following elements will change:
|
||
<ul><li><b>tt_content.menu</b> (used f.e. for sitemaps): Instead of div-tags, lists are used now.</li>
|
||
<li><b>tt_content.mailform</b>: Mailforms do not use tables anymore, instead, they use the div-tag. Besides that, mailforms are accessible now.</li>
|
||
<li><b>The p-tag</b> has been removed from all table cells.</li>
|
||
<li><b>CSS based "image" and "text with image"</b><br />As the extension cron_cssstyledimgtext has been merged into the core, rendering of the content elements "image" and "text with image" has been changed to be CSS instead of table based. Read the <a href="http://wiki.typo3.org/index.php/TYPO3_4.0" target="_blank">4.0 release notes</a> for further information.</li></ul>',
|
||
'description_acknowledge' => 'You will have to update your stylesheets to comply with these changes.'
|
||
<ul><li><p><strong>tt_content.menu</strong> (used f.e. for sitemaps): Instead of div-tags, lists are used now.</p></li>
|
||
<li><p><strong>tt_content.mailform</strong>: Mailforms do not use tables anymore, instead, they use the div-tag. Besides that, mailforms are accessible now.</p></li>
|
||
<li><p><strong>The p-tag</strong> has been removed from all table cells.</p></li>
|
||
<li><p><strong>CSS based "image" and "text with image"</strong><br />As the extension cron_cssstyledimgtext has been merged into the core, rendering of the content elements "image" and "text with image" has been changed to be CSS instead of table based. Read the <a href="http://wiki.typo3.org/index.php/TYPO3_4.0" target="_blank">4.0 release notes</a> for further information.</p></li></ul></p>',
|
||
'description_acknowledge' => 'You will probably need to update your stylesheets to comply with these changes.'
|
||
);
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_allowAddressTags'] = array(
|
||
'title' => 'CSS Styled Content: Add "address" to list of allowed tags inside links',
|
||
'version' => 4002000,
|
||
'description' => '<p>Allow "address" tags inside link parsed by the internal HTML parser.</p>',
|
||
'description_acknowledge' => 'You will probably need to update your stylesheets to comply with this change.'
|
||
);
|
||
?>
|