浏览代码

Ticket #2663 - point №1

AntonLV 6 年之前
父节点
当前提交
1ee6f0937a

+ 1 - 1
studio/classes/BxDolStudioInstaller.php

@@ -1042,7 +1042,7 @@ class BxDolStudioInstaller extends BxDolInstallerUtils
     	$bCompatible = false;
         if(isset($this->_aConfig['compatible_with']) && is_array($this->_aConfig['compatible_with']))
             foreach($this->_aConfig['compatible_with'] as $iKey => $sVersionReq)
-            	$bCompatible = $bCompatible || (version_compare($sVersionCur, $sVersionReq, '>=') == 1);
+            	$bCompatible = $bCompatible || (version_compare(strtolower($sVersionCur), strtolower($sVersionReq), '>=') == 1);
 
 		return $bCompatible;
     }

+ 1 - 1
studio/classes/BxDolStudioInstallerUtils.php

@@ -226,7 +226,7 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
                 continue;
 
             $aUpdate = $this->getConfigUpdate($sPathModule . 'install/config.php', $sPathUpdate . 'install/config.php', $mixedModule);
-            if(empty($aUpdate) || !is_array($aUpdate) || version_compare($aUpdate['module_version'], $aUpdate['version_from']) != 0)
+            if(empty($aUpdate) || !is_array($aUpdate) || version_compare(strtolower($aUpdate['module_version']), strtolower($aUpdate['version_from'])) != 0)
                 continue;
 
             $aResult = $aUpdate;

+ 1 - 1
studio/classes/BxDolStudioUpdater.php

@@ -74,7 +74,7 @@ class BxDolStudioUpdater extends BxDolStudioInstaller
             );
 
         //--- Check version ---//
-        if(version_compare($aModuleInfo['version'], $this->_aConfig['version_from']) != 0)
+        if(version_compare(strtolower($aModuleInfo['version']), strtolower($this->_aConfig['version_from'])) != 0)
             return array_merge($aResult, array(
                 'code' => BX_DOL_STUDIO_IU_RCE_WMV,
                 'message' => $this->_displayResult('check_module_version', false, '_adm_err_modules_wrong_version', $bHtmlResponce),

+ 1 - 1
studio/template/scripts/BxBaseStudioStore.php

@@ -617,7 +617,7 @@ class BxBaseStudioStore extends BxDolStudioStore
         $bDownload = ($bFree || $bPurchased) && $bDownloadable;
 
         $bDiscount = !empty($aProduct['discount_single']);
-        $sVersion = $bDownloaded && version_compare($aDownloaded[$sModuleName]['version'], $aProduct['version']) != 0 ? _t('_adm_str_txt_pv_version_mask', $aDownloaded[$sModuleName]['version'], $aProduct['version']) : $aProduct['version'];
+        $sVersion = $bDownloaded && version_compare(strtolower($aDownloaded[$sModuleName]['version']), strtolower($aProduct['version'])) != 0 ? _t('_adm_str_txt_pv_version_mask', $aDownloaded[$sModuleName]['version'], $aProduct['version']) : $aProduct['version'];
 
         $iScreenshots = 0;
         $aScreenshots = array();