Fixed bug #3069 again: Ignore version check if no requirements are specified
authorMichael Stucki <michael.stucki@typo3.org>
Tue, 6 Feb 2007 09:39:54 +0000 (09:39 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Tue, 6 Feb 2007 09:39:54 +0000 (09:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-0@2004 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 8f10c42..49d6100 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-06  Michael Stucki  <michael@typo3.org>
+
+       * Fixed bug #3069 again: Ignore version check if no requirements are specified
+
 2007-02-04  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #3069: Extension manager crashed because of some PHP bug with version_compare() (thanks to Rainer Haertlein who discovered the solution to this problem)
index c8be539..b3b6ad9 100644 (file)
@@ -4042,12 +4042,12 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                if(!$depV) continue;
                                $versionRange = $this->splitVersionRange($depV);
                                $phpv = strstr(PHP_VERSION,'-') ? substr(PHP_VERSION,0,strpos(PHP_VERSION,'-')) : PHP_VERSION; // Linux distributors like to add suffixes, like in 5.1.2-1. Those must be ignored!
-                               if ($versionRange[0] && version_compare($phpv,$versionRange[0],'<'))    {
+                               if ($versionRange[0]!='0.0.0' && version_compare($phpv,$versionRange[0],'<'))   {
                                        $msg[] = '<br />The running PHP version ('.$phpv.') is lower than required ('.$versionRange[0].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;
                                        continue;
-                               } elseif ($versionRange[1] && version_compare($phpv,$versionRange[1],'>'))      {
+                               } elseif ($versionRange[1]!='0.0.0' && version_compare($phpv,$versionRange[1],'>'))     {
                                        $msg[] = '<br />The running PHP version ('.$phpv.') is higher than allowed ('.$versionRange[1].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;
@@ -4058,12 +4058,12 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                if (!$depV) continue;
 
                                $versionRange = $this->splitVersionRange($depV);
-                               if ($versionRange[0] && version_compare(TYPO3_version,$versionRange[0],'<'))    {
+                               if ($versionRange[0]!='0.0.0' && version_compare(TYPO3_version,$versionRange[0],'<'))   {
                                        $msg[] = '<br />The running TYPO3 version ('.TYPO3_version.') is lower than required ('.$versionRange[0].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;
                                        continue;
-                               } elseif ($versionRange[1] && version_compare(TYPO3_version,$versionRange[1],'>'))      {
+                               } elseif ($versionRange[1]!='0.0.0' && version_compare(TYPO3_version,$versionRange[1],'>'))     {
                                        $msg[] = '<br />The running TYPO3 version ('.TYPO3_version.') is higher than allowed ('.$versionRange[1].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;
@@ -4082,12 +4082,12 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                $depError = true;
                        } else {
                                $versionRange = $this->splitVersionRange($depV);
-                               if ($versionRange[0] && version_compare($instExtInfo[$depK]['EM_CONF']['version'],$versionRange[0],'<'))        {
+                               if ($versionRange[0]!='0.0.0' && version_compare($instExtInfo[$depK]['EM_CONF']['version'],$versionRange[0],'<'))       {
                                        $msg[] = '<br />The running version of extension "'.$depK.'" ('.$instExtInfo[$depK]['EM_CONF']['version'].') is lower than required ('.$versionRange[0].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;
                                        continue;
-                               } elseif ($versionRange[1] && version_compare($instExtInfo[$depK]['EM_CONF']['version'],$versionRange[1],'>'))  {
+                               } elseif ($versionRange[1]!='0.0.0' && version_compare($instExtInfo[$depK]['EM_CONF']['version'],$versionRange[1],'>')) {
                                        $msg[] = '<br />The running version of extension "'.$depK.'" ('.$instExtInfo[$depK]['EM_CONF']['version'].') is higher than allowed ('.$versionRange[1].')';
                                        $msg[] = '&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="depsolver[ignore]['.$depK.']" /> Ignore this version requirement';
                                        $depError = true;