Added extra sanity check when cleaning up version numbers in constraints, solves...
authorKarsten Dambekalns <karsten.dambekalns@typo3.org>
Thu, 13 Jul 2006 21:29:44 +0000 (21:29 +0000)
committerKarsten Dambekalns <karsten.dambekalns@typo3.org>
Thu, 13 Jul 2006 21:29:44 +0000 (21:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1637 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/mod/tools/em/class.em_index.php

index 57ec46b..787a55f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2006-07-13 Karsten Dambekalns <karsten@typo3.org>
 
-       * EM: Fixed bug #3299 (Language pack installation cannot handle spaces in filenames)
+       * EM: Fixed bug #3299 (Language pack installation cannot handle spaces in filenames).
+       * EM: Added extra sanity check when cleaning up version numbers in constraints, solves bogus warnings when installing extensions.
 
 2006-07-13 Wolfgang Klinger <wk@plan2.net>
 
index 9ad9e03..cc0c01b 100644 (file)
@@ -3013,6 +3013,21 @@ EXTENSION KEYS:
                        $emConf['dependencies'] = $this->depToString($emConf['constraints']);
                        $emConf['conflicts'] = $this->depToString($emConf['constraints'], 'conflicts');
                }
+
+                       // sanity check for version numbers, intentionally only checks php and typo3
+               if(isset($emConf['constraints']['depends']) && isset($emConf['constraints']['depends']['php'])) {
+                       $versionRange = $this->splitVersionRange($emConf['constraints']['depends']['php']);
+                       if(version_compare($versionRange[0],'3.0.0','<')) $versionRange[0] = '3.0.0';
+                       if(version_compare($versionRange[1],'3.0.0','<')) $versionRange[1] = '';
+                       $emConf['constraints']['depends']['php'] = implode('-',$versionRange);
+               }
+               if(isset($emConf['constraints']['depends']) && isset($emConf['constraints']['depends']['typo3'])) {
+                       $versionRange = $this->splitVersionRange($emConf['constraints']['depends']['typo3']);
+                       if(version_compare($versionRange[0],'3.5.0','<')) $versionRange[0] = '3.0.0';
+                       if(version_compare($versionRange[1],'3.5.0','<')) $versionRange[1] = '';
+                       $emConf['constraints']['depends']['typo3'] = implode('-',$versionRange);
+               }
+
                unset($emConf['private']);
                unset($emConf['download_password']);
                unset($emConf['TYPO3_version']);