* Fix bug #3362 (again): Bugfix used t3lib_div which is missing at that point
authorMichael Stucki <michael.stucki@typo3.org>
Sun, 30 Jul 2006 21:50:38 +0000 (21:50 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Sun, 30 Jul 2006 21:50:38 +0000 (21:50 +0000)
        * Fix bug #3943: compat_version was accidentally changed to 4.0.1

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1660 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_div.php
typo3/init.php
typo3/sysext/cms/ext_localconf.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/css_styled_content/ext_localconf.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php
typo3/sysext/install/updates/class.tx_coreupdates_notinmenu.php
typo3/sysext/rtehtmlarea/ChangeLog

index 865da4d..0a2f605 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,17 @@
-2006-07-24 Karsten Dambekalns <karsten@typo3.org>
+2006-07-30  Michael Stucki  <michael@typo3.org>
+
+       * Fix bug #3362 (again): Bugfix used t3lib_div which is missing at that point
+       * Fix bug #3943: compat_version was accidentally changed to 4.0.1
+
+2006-07-24  Karsten Dambekalns  <karsten@typo3.org>
 
        * t3lib/cconfig_default.php: Fixed bug #3246 - error in t3lib/config_default.php on setting display_errors.
 
-2006-07-23 Karsten Dambekalns <karsten@typo3.org>
+2006-07-23  Karsten Dambekalns  <karsten@typo3.org>
 
        * t3lib/class.t3lib_div.php: Added a clarifying note to the comment for loadTCA(), thanks to Johannes Konert.
 
-2006-07-17 Dmitry Dulepov <typo3@accio.lv>
+2006-07-17  Dmitry Dulepov  <typo3@accio.lv>
 
        * t3lib_tceforms: now using "labels.new" from locallang instead of hard-coded "NEW"
 
@@ -38,7 +43,7 @@
 
        * Fix bug #3600: config.formMailCharset is not honoured
        * t3lib_formmail: do charset conversion for mails when config.formMailCharset is set or config.metaCharset different from config.renderCharset
-       * t3lib_formmail: use $this->messageid of base class 
+       * t3lib_formmail: use $this->messageid of base class
 
 2006-07-12 Dmitry Dulepov <typo3@accio.lv>
 
index 54d6e7d..e5c21f4 100755 (executable)
@@ -3489,9 +3489,9 @@ class t3lib_BEfunc        {
                        }
 
                                // check if there are still updates to perform
-                       if (!t3lib_div::compat_version(TYPO3_version))  {
+                       if (!t3lib_div::compat_version(TYPO3_branch))   {
                                $url = 'install/index.php?redirect_url=index.php'.urlencode('?TYPO3_INSTALL[type]=update');
-                               $warnings[] = 'This installation is not configured for the TYPO3 version it is running. Please visit the <a href="'.$url.'" target="_blank">Update Wizard</a> in the Install Tool.';
+                               $warnings[] = 'This installation is not configured for the TYPO3 version it is running. You probably did so by intention, in this case you can safely ignore this message. If unsure, visit the <a href="'.$url.'" target="_blank">Update Wizard</a> in the Install Tool to see which changes would be affected.';
                        }
 
                                // check if sys_refindex is empty
index 979d541..67af55e 100755 (executable)
@@ -927,13 +927,15 @@ class t3lib_div {
 
        /**
         * Returns true if the current TYPO3 version (or compatibility version) is compatible to the input version
+        * Notice that this function compares branches, not versions (4.0.1 would be > 4.0.0 although they use the same compat_version)
         *
-        * @param       string          Minimum version number required (format x.y.z)
-        * @return      boolean         true or false
+        * @param       string          Minimum branch number required (format x.y / e.g. "4.0" NOT "4.0.0"!)
+        * @return      boolean         Returns true if this setup is compatible with the provided version number
+        * @todo        Still needs a function to convert versions to branches
         */
        function compat_version($verNumberStr)  {
                global $TYPO3_CONF_VARS;
-               $currVersionStr = $TYPO3_CONF_VARS['SYS']['compat_version']?$TYPO3_CONF_VARS['SYS']['compat_version']:TYPO3_version;
+               $currVersionStr = $TYPO3_CONF_VARS['SYS']['compat_version'] ? $TYPO3_CONF_VARS['SYS']['compat_version'] : TYPO3_branch;
 
                if (t3lib_div::int_from_ver($currVersionStr) < t3lib_div::int_from_ver($verNumberStr))  {
                        return FALSE;
index 5cc7fc9..27b512a 100755 (executable)
@@ -99,8 +99,9 @@ if (!$temp_path || substr($temp_path,-strlen(TYPO3_mainDir))!=TYPO3_mainDir)  {       /
        if (TYPO3_OS=='WIN')    {
                $thisPath_base = basename(substr($temp_path,-strlen(TYPO3_mainDir)));
                $mainPath_base = basename(TYPO3_mainDir);
-               if (strtolower($thisPath) == strtolower($mainPath))     {       // Seems like the requested URL is not case-specific. This may happen on Windows only. -case. Otherwise, redirect to the correct URL. TYPO3_mainDir must be lower-case!!
-                       header('Location: '.str_replace($thisPath_base, $mainPath_base, t3lib_div::getIndpEnv('SCRIPT_NAME')));
+               if (!strcasecmp($thisPath, $mainPath))  {       // Seems like the requested URL is not case-specific. This may happen on Windows only. -case. Otherwise, redirect to the correct URL. TYPO3_mainDir must be lower-case!!
+                       $script_name = (php_sapi_name()=='cgi'||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) ? ($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) : ($_SERVER['ORIG_SCRIPT_NAME']?$_SERVER['ORIG_SCRIPT_NAME']:$_SERVER['SCRIPT_NAME']);      // Copied from t3lib_div::getIndpEnv()
+                       header('Location: '.str_replace($thisPath_base, $mainPath_base, $script_name));
                        exit;
                }
        }
index 4f8be80..51b5d1e 100755 (executable)
@@ -6,15 +6,14 @@ $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',
        'version' => 4000000,
-       'description' => '<p>Word separator character for simulateStaticDocument is changed ' .
-                                       'from underscore (_) to hyphen (-) to make URLs more friendly ' .
-                                       'for search engines. Previously generated URLs (external links ' .
-                                       'to your site) will work as before.</p><p>You can set separator ' .
-                                       'character back to underscore by putting the following line into ' .
-                                       '<b>Setup</b> section of you page TS template:</p><p style="margin-top: 5px">' .
-                                       '<code>config.simulateStaticDocuments_replacementChar = _</code></p>',
-       'description_acknowledge' => ''
+       '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>',
 );
 
 ?>
\ No newline at end of file
index 7e6a8ac..b91a11b 100755 (executable)
                                        }
 
                                                // set default values for removeDefaultJS and inlineStyle2TempFile so CSS and JS are externalized if compatversion is higher than 4.0
-                                       if(!isset($this->config['config']['removeDefaultJS']) && t3lib_div::compat_version('4.0.0')) {
+                                       if (!isset($this->config['config']['removeDefaultJS']) && t3lib_div::compat_version('4.0'))     {
                                                $this->config['config']['removeDefaultJS'] = 'external';
                                        }
-                                       if(!isset($this->config['config']['inlineStyle2TempFile']) && t3lib_div::compat_version('4.0.0')) {
+                                       if (!isset($this->config['config']['inlineStyle2TempFile']) && t3lib_div::compat_version('4.0'))        {
                                                $this->config['config']['inlineStyle2TempFile'] = 1;
                                        }
 
@@ -3322,7 +3322,7 @@ if (version == "n3") {
         * @return      void
         */
        function setSimulReplacementChar() {
-               $replacement = $defChar = t3lib_div::compat_version('4.0.0') ? '-' : '_';
+               $replacement = $defChar = t3lib_div::compat_version('4.0') ? '-' : '_';
                if (isset($this->config['config']['simulateStaticDocuments_replacementChar'])) {
                        $replacement = trim($this->config['config']['simulateStaticDocuments_replacementChar']);
                        if (urlencode($replacement) != $replacement) {
index fbf0021..ca2e179 100755 (executable)
@@ -14,7 +14,16 @@ if ($_EXTCONF['removePositionTypes'])        {
        ');
 }
 
-$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_accessibility'] = array('version' => 3009000, 'description' => 'The rendering of the following elements has changed:<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 has been removed from all table cells.</b></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. See the <a href="http://wiki.typo3.org/index.php/TYPO3_4.0">4.0 release notes</a> for further information.</li></ul>', 'description_acknowledge' => 'Yes, I know that I will need to update my stylesheets to comply with this change.');
+$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_accessibility'] = array(
+       'title' => 'CSS Styled Content: Accessibility improvements',
+       'version' => 3009000,
+       '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.'
+);
 
 
 ?>
\ No newline at end of file
index 0ac581b..5689abe 100755 (executable)
@@ -678,7 +678,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                           '.$this->fontTag1.'<br />
                                                           <input type="hidden" name="step" value="2">
                                                           <input type="hidden" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="'.md5(uniqid(rand(),true)).'">
-                                                                <input type="hidden" name="TYPO3_INSTALL[localconf.php][compat_version]" value="'.TYPO3_version.'">
+                                                                <input type="hidden" name="TYPO3_INSTALL[localconf.php][compat_version]" value="'.TYPO3_branch.'">
                                                           <input type="submit" value="Continue"><br /><br /><strong>NOTICE: </strong>By clicking this button, typo3conf/localconf.php is updated with new values for the parameters listed above!</span><br />
                                                        </td>
                                                </tr>
@@ -3895,6 +3895,7 @@ From sub-directory:
                $this->updateWizard_parts($action);
                echo $this->outputWrapper($this->printAll());
        }
+
        /**
         * Implements the steps for the update wizard
         *
@@ -3905,7 +3906,7 @@ From sub-directory:
                $content = '';
                switch ($action)        {
                        case 'checkForUpdate':  // first step - check for updates available
-                               $title = 'Update wizards';
+                               $title = 'Step 1 - Introduction';
                                $updateWizardBoxes = '';
                                if (!$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])        {
                                        $content = '<strong>No updates registered!</strong>';
@@ -3918,13 +3919,12 @@ From sub-directory:
                                        if (method_exists($tmpObj,'checkForUpdate'))    {
                                                $explanation = '';
                                                if ($tmpObj->checkForUpdate($explanation))      {
-                                                       $updateWizardBoxes .= '
-                                                               <div style="border: 1px solid; padding: 10px; margin: 10px; padding-top:0px;">
+                                                       $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="'.$identifier.'" />
-                                                               </div>
-                                                       ';
+                                                                       <input type="submit" name="TYPO3_INSTALL[update]['.$identifier.']" id="TYPO3_INSTALL[update]['.$identifier.']" value="Next" />
+                                                               </div>';
                                                }
                                        }
                                }
@@ -3934,16 +3934,14 @@ From sub-directory:
                                        $content = '
                                                <form action="'.$this->action.'#bottom" method="post">
                                                        <input type="hidden" name="TYPO3_INSTALL[database_type]" value="'.htmlspecialchars('getUserInput').'">
-                                                       '.$updateWizardBoxes.'<br />
-                                               </form>
-                                       ';
+                                                       '.$updateWizardBoxes.'</form>';
                                } else {
                                        $content = '<strong>No updates to perform!</strong>';
                                }
                        break;
                        case 'getUserInput':    // second step - get user input and ask for final confirmation
-                               $title = '2 - configuration of updates';
-                               $formContent = '<strong>The following updates will be performed:</strong>';
+                               $title = 'Step 2 - Configuration of updates';
+                               $formContent = '<p style="width:400px;"><strong>The following updates will be performed:</strong></p>';
                                if (!$this->INSTALL['update'])  {
                                        $content = '<strong>No updates selected!</strong>';
                                        break;
@@ -3958,13 +3956,13 @@ From sub-directory:
                                        if (method_exists($tmpObj,'getUserInput'))      {
                                                $formContent .= $tmpObj->getUserInput('TYPO3_INSTALL[update]['.$identifier.']');
                                        }
-                                       $formContent .= '</p><hr />';
+                                       $formContent.= '</p>';
                                }
-                               $formContent .= '<p><input type="checkbox" name="TYPO3_INSTALL[update][showDatabaseQueries]" id="TYPO3_INSTALL[update][showDatabaseQueries]" value="1" /> <label for="TYPO3_INSTALL[update][showDatabaseQueries]">Show database queries performed</label></p>';
-                               $content = $this->getUpdateDbFormWrap('performUpdate', $formContent,'3 -Perform updates!');
+                               $formContent.= '<input type="checkbox" name="TYPO3_INSTALL[update][showDatabaseQueries]" id="TYPO3_INSTALL[update][showDatabaseQueries]" value="1" /> <label for="TYPO3_INSTALL[update][showDatabaseQueries]">Show database queries performed</label><br />';
+                               $content = $this->getUpdateDbFormWrap('performUpdate', $formContent,'Perform updates!');
                        break;
                        case 'performUpdate':   // third step - perform update
-                               $title = '3 - perform updates';
+                               $title = 'Step 3 - Perform updates';
                                if (!$this->INSTALL['update']['extList'])       { break; }
 
                                $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = TRUE;
@@ -3973,13 +3971,13 @@ From sub-directory:
 
                                        $tmpObj = &$this->getUpgradeObjInstance($className, $identifier);
 
-                                       $content = '<p><strong>'.$identifier.'</strong><br />';
+                                       $content = '<p style="width: 400px;"><strong>'.$identifier.'</strong></p>';
                                                // check user input if testing method is available
                                        if (method_exists($tmpObj,'checkUserInput'))    {
                                                $customOutput = '';
                                                if (!$tmpObj->checkUserInput($customOutput))    {
-                                                       $content .= '<strong>'.($customOutput?$customOutput:'Something went wrong').'</strong>';
-                                                       $content .= '<br /><a href="javascript:history.back()">Go back to update configuration</a>';
+                                                       $content.= ($customOutput?$customOutput:'Something went wrong').'<br /><br />';
+                                                       $content.= '<a href="javascript:history.back()">Go back to update configuration</a>';
                                                        break;
                                                }
                                        }
@@ -3990,17 +3988,17 @@ From sub-directory:
                                                if ($tmpObj->performUpdate($dbQueries, $customOutput))  {
                                                        $content .= '<strong>Update successful!</strong>';
                                                } else {
-                                                       $content .= '<strong>FAILURE!</strong>';
+                                                       $content.= '<strong>Update FAILED!</strong>';
                                                }
                                                if ($this->INSTALL['update']['showDatabaseQueries'])    {
                                                        $content .= '<br />' . implode('<br />',$dbQueries);
                                                }
-                                               $content .= '<br />' . $customOutput;
-
+                                               if (strlen($customOutput))      {
+                                                       $content.= '<br />' . $customOutput;
+                                               }
                                        } else {
                                                $content .= '<strong>No update method available!</strong>';
                                        }
-                                       $content .= '</p><hr />';
                                }
                                $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = FALSE;
                        break;
index e21d176..70447b0 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Sebastian Kurfuerst (sebastian@garbage-group.de)
+*  (c) 1999-2006 Sebastian Kurfuerst (sebastian@garbage-group.de)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -42,8 +42,9 @@ class tx_coreupdates_compatversion {
         */
        function checkForUpdate(&$description)  {
                global $TYPO3_CONF_VARS;
+
                if ($this->compatVersionIsCurrent())    {
-                       $description = '<b>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.'.</b>
+                       $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.
@@ -57,10 +58,10 @@ class tx_coreupdates_compatversion {
                                The compatibility version has been set to the current TYPO3 version. This is a stamp and has no impact for your installation.';
                        }
                } 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. In the next step, you will see the things that need to be adjusted to make your installation compatible with the new features.';
+                       $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.';
                }
 
-               return 1;
+               return 1;       // Return 1 in any case so user has possibility to switch back to a previous compat_version.
        }
 
        /**
@@ -72,7 +73,7 @@ class tx_coreupdates_compatversion {
        function getUserInput($inputPrefix)     {
                global $TYPO3_CONF_VARS;
                if ($this->compatVersionIsCurrent())    {
-                       $content = '<b>You updated from an older version of TYPO3</b>:<br>
+                       $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'
@@ -83,11 +84,11 @@ class tx_coreupdates_compatversion {
                        $content .= '</select>';
                } 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 />
-                       <b>Follow the steps below carefully and confirm every step!</b> You will see this list again after you performed the update.';
+                       <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 .= '<br /><input type="checkbox" name="'.$inputPrefix.'[compatVersion][all]" id="'.$inputPrefix.'[compatVersion][all]" value="1"> <b><label for="'.$inputPrefix.'[compatVersion][all]">ignore selection above - WARNING: this might break the output of your website.</label></b>';
+                       $content.= '<p><input type="checkbox" name="'.$inputPrefix.'[compatVersion][all]" id="'.$inputPrefix.'[compatVersion][all]" value="1">&nbsp;<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 />';
                }
                return $content;
        }
@@ -100,6 +101,7 @@ class tx_coreupdates_compatversion {
         */
        function checkUserInput(&$customMessages)       {
                global $TYPO3_CONF_VARS;
+
                if ($this->compatVersionIsCurrent())    {
                        return 1;
                } else {
@@ -108,7 +110,8 @@ class tx_coreupdates_compatversion {
                        } else {
                                $performUpdate = 1;
                                $oldVersion = t3lib_div::int_from_ver($TYPO3_CONF_VARS['SYS']['compat_version']);
-                               $currentVersion = t3lib_div::int_from_ver(TYPO3_version);
+                               $currentVersion = t3lib_div::int_from_ver(TYPO3_branch);
+
                                foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'] as $internalName => $details)  {
                                        if ($details['version'] > $oldVersion && $details['version'] <= $currentVersion)        {
                                                if (!$this->userInput['compatVersion'][$internalName])  {
@@ -139,12 +142,10 @@ class tx_coreupdates_compatversion {
                }
 
                $linesArr = $this->pObj->writeToLocalconf_control();
-               $version = $this->userInput['version']?$this->userInput['version']:TYPO3_version;
+               $version = $this->userInput['version'] ? $this->userInput['version'] : TYPO3_branch;
                $this->pObj->setValueInLocalconfFile($linesArr, '$TYPO3_CONF_VARS["SYS"]["compat_version"]', $version);
                $this->pObj->writeToLocalconf_control($linesArr,0);
-               $customMessages .= '
-               The compatibility version has been set to '.$version.'.';
-               $customMessages .= $this->showChangesNeeded();
+               $customMessages.= '<br />The compatibility version has been set to '.$version.'.';
 
                return 1;
        }
@@ -162,7 +163,7 @@ class tx_coreupdates_compatversion {
         */
        function compatVersionIsCurrent()       {
                global $TYPO3_CONF_VARS;
-               if ($TYPO3_CONF_VARS['SYS']['compat_version'] && t3lib_div::int_from_ver(TYPO3_version) != t3lib_div::int_from_ver($TYPO3_CONF_VARS['SYS']['compat_version']))  {
+               if (TYPO3_branch != $TYPO3_CONF_VARS['SYS']['compat_version'])  {
                        return 0;
                } else {
                        return 1;
@@ -178,19 +179,29 @@ class tx_coreupdates_compatversion {
        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_version);
+               $currentVersion = t3lib_div::int_from_ver(TYPO3_branch);
 
                $tableContents = '';
+
                if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'])) {
+                       $updateWizardBoxes = '';
                        foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version'] as $internalName => $details)  {
                                if ($details['version'] > $oldVersion && $details['version'] <= $currentVersion)        {
-                                       $tableContents .= '<tr><td colspan="2"><hr /></td></tr>
-                                       <tr><td valign="bottom">'.($inputPrefix?'<input type="checkbox" name="'.$inputPrefix.'[compatVersion]['.$internalName.']" id="'.$inputPrefix.'[compatVersion]['.$internalName.']" value="1">':'&nbsp;').'</td><td>'.str_replace(chr(10),'<br />',$details['description']).($inputPrefix?'<br /><b><label for="'.$inputPrefix.'[compatVersion]['.$internalName.']">'.$details['description_acknowledge'].'</label></b>':'').'</td></tr>';
+                                       $description = str_replace(chr(10),'<br />',$details['description']);
+                                       $description_acknowledge = (isset($details['description_acknowledge']) ? str_replace(chr(10),'<br />',$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>
+                                                       <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">&nbsp;<strong><label for="'.$inputPrefix.'[compatVersion]['.$internalName.']">Acknowledged</label></strong></p>' : '').'
+                                               </div>';
                                }
                        }
                }
-               if (strlen($tableContents))     {
-                       return '<table>'.$tableContents.'</table>';
+               if (strlen($updateWizardBoxes)) {
+                       return '<table><tr><td>'.$updateWizardBoxes.'</td></tr></table>';
                }
                return '';
        }
index 66b77f6..ec67d1b 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Sebastian Kurfuerst (sebastian@garbage-group.de)
+*  (c) 1999-2006 Sebastian Kurfuerst (sebastian@garbage-group.de)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -33,9 +33,11 @@ class tx_coreupdates_notinmenu {
        var $versionNumber;     // version number coming from t3lib_div::int_from_ver()
        var $pObj;      // parent object (tx_install)
        var $userInput; // user input
+
        function checkForUpdate(&$description)  {
-               $description = 'Removes the doctype "not in menu" which is deprecated and sets instead the page flag "not in menu".';
-               if($this->versionNumber >= 3009000)     {
+               $description = 'Removes the doctype "Not in menu" which is deprecated and sets the successing page flag "Not in menu" instead.';
+
+               if ($this->versionNumber >= 3009000)    {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','pages','doktype=5');
                        if($GLOBALS['TYPO3_DB']->sql_num_rows($res))    {
                                return 1;
@@ -59,11 +61,12 @@ class tx_coreupdates_notinmenu {
                        );
 
                        $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'doktype=5', $updateArray);
-                       $dbQueries[] = $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery;
-                       if ($GLOBALS['TYPO3_DB']->sql_affected_rows($res))      {
-                               return 1;
+                       $dbQueries[] = str_replace(chr(10), ' ', $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
+
+                       if ($GLOBALS['TYPO3_DB']->sql_error())  {
+                               return 0;       // something went wrong
                        }
-                       return 0;       // zero rows affected, maybe error
+                       return 1;
                }
        }
 }
index 2610728..327105d 100644 (file)
 2006-01-08  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
        * Version 1.1.1
        * Correction to path settings affecting image drag & drop and file/image upload.
-       
+
 2006-01-06  Stanislas Rolland  <stanislas.rolland(arobas)fructifor.ca>
        * Version 1.1.0
        * Convert all locallang files to xml.
        * Revised About window. Skins need to be upgraded. Custom skins need to be updated.
        * New anchor accessibility feature.
        * Correction: erratic behaviors in Mozilla/Firefox when automatically detecting links and when backspacing.
-       * Correction: PHP Fatal error when SpellChecker is enabled under PHP5. See http://bugs.typo3.org/view.php?id=1470 
+       * Correction: PHP Fatal error when SpellChecker is enabled under PHP5. See http://bugs.typo3.org/view.php?id=1470
        * Update to the Dutch and German translations.
        * Correction for IE (and maybe other cases, see http://bugs.typo3.org/view.php?id=1425): When an unforgiving browser refuses to parse the content coming from the database, a popup window will inform the user that the HTML document is not well-formed, and the editor will be started in textmode so that the user can edit the error in the HTML source.
        * Correction: nested lists were not compliant with XHTML.