adjust precheck for combined module connector
This commit is contained in:
parent
69a57cd68a
commit
7d3fff5255
@ -177,7 +177,7 @@ date_default_timezone_set('Europe/Berlin');
|
|||||||
*/
|
*/
|
||||||
class requCheck
|
class requCheck
|
||||||
{
|
{
|
||||||
public $sVersion = '4.0';
|
public $sVersion = '4.1';
|
||||||
|
|
||||||
protected $_db = false;
|
protected $_db = false;
|
||||||
|
|
||||||
@ -224,6 +224,9 @@ class requCheck
|
|||||||
{
|
{
|
||||||
$this->oLayout->getHTMLHeader();
|
$this->oLayout->getHTMLHeader();
|
||||||
|
|
||||||
|
$oCheckTransformation = new requTransformation($this);
|
||||||
|
$this->oConfig->aCheck = $oCheckTransformation->transformCheckList($this->oConfig->aCheck);
|
||||||
|
|
||||||
$this->_runThroughChecks($this->oConfig->aCheck);
|
$this->_runThroughChecks($this->oConfig->aCheck);
|
||||||
|
|
||||||
$this->oLayout->getHTMLFooter();
|
$this->oLayout->getHTMLFooter();
|
||||||
@ -413,7 +416,7 @@ class requCheck
|
|||||||
/**
|
/**
|
||||||
* @return bool|resource
|
* @return bool|resource
|
||||||
*/
|
*/
|
||||||
protected function _getDb()
|
public function getDb()
|
||||||
{
|
{
|
||||||
if (!$this->_db) {
|
if (!$this->_db) {
|
||||||
if (file_exists('config.inc.php')) {
|
if (file_exists('config.inc.php')) {
|
||||||
@ -473,7 +476,7 @@ class requCheck
|
|||||||
$aIgnoreDirItems = array('.', '..');
|
$aIgnoreDirItems = array('.', '..');
|
||||||
|
|
||||||
/** @var SplFileInfo $oFileInfo */
|
/** @var SplFileInfo $oFileInfo */
|
||||||
foreach (new RecursiveDirectoryIterator($sFolder) AS $oFileInfo) {
|
foreach (new RecursiveDirectoryIterator($sFolder) as $oFileInfo) {
|
||||||
if (!in_array($oFileInfo->getFileName(), $aIgnoreDirItems) && $oFileInfo->isDir()) {
|
if (!in_array($oFileInfo->getFileName(), $aIgnoreDirItems) && $oFileInfo->isDir()) {
|
||||||
$this->_checkDelFilesInDir($oFileInfo->getRealPath());
|
$this->_checkDelFilesInDir($oFileInfo->getRealPath());
|
||||||
} elseif ($oFileInfo->isFile()) {
|
} elseif ($oFileInfo->isFile()) {
|
||||||
@ -499,7 +502,7 @@ class requCheck
|
|||||||
public function displayCheck($sCheckType, &$aConfiguration)
|
public function displayCheck($sCheckType, &$aConfiguration)
|
||||||
{
|
{
|
||||||
$sGenCheckType = preg_replace("@(\_[0-9]$)@", "", $sCheckType);
|
$sGenCheckType = preg_replace("@(\_[0-9]$)@", "", $sCheckType);
|
||||||
$oTests = new requTests($this, $this->oConfig, $this->_getDb(), $this->oRemote);
|
$oTests = new requTests($this, $this->oConfig, $this->getDb(), $this->oRemote);
|
||||||
|
|
||||||
if (method_exists($oTests, $sGenCheckType)) {
|
if (method_exists($oTests, $sGenCheckType)) {
|
||||||
$aResult = $oTests->{$sGenCheckType}($aConfiguration);
|
$aResult = $oTests->{$sGenCheckType}($aConfiguration);
|
||||||
@ -585,13 +588,11 @@ EOT;
|
|||||||
$sTranslDependent = $this->translate('dependentoffurther');
|
$sTranslDependent = $this->translate('dependentoffurther');
|
||||||
|
|
||||||
if ($this->oBase->blGlobalResult) {
|
if ($this->oBase->blGlobalResult) {
|
||||||
echo '<p class="box_ok"><b>' . $this->translate('globalSuccess') . '</b>' . $this->translate(
|
echo '<p class="box_ok"><b>' . $this->translate('globalSuccess') . '</b>' .
|
||||||
'deleteFile1'
|
$this->translate('deleteFile1') . $sScriptName . $this->translate('deleteFile2') . '</p>';
|
||||||
) . $sScriptName . $this->translate('deleteFile2') . '</p>';
|
|
||||||
} else {
|
} else {
|
||||||
echo '<p class="box_warning"><b>' . $this->translate('globalNotSuccess') . '</b>' . $this->translate(
|
echo '<p class="box_warning"><b>' . $this->translate('globalNotSuccess') . '</b>' .
|
||||||
'deleteFile1'
|
$this->translate('deleteFile1') . $sScriptName . $this->translate('deleteFile2') . '</p>';
|
||||||
) . $sScriptName . $this->translate('deleteFile2') . '</p>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo <<< EOT
|
echo <<< EOT
|
||||||
@ -617,12 +618,9 @@ EOT;
|
|||||||
*/
|
*/
|
||||||
public function getNoSuccessItem($aResult, $sElementId, $sCheckType, $aConfiguration)
|
public function getNoSuccessItem($aResult, $sElementId, $sCheckType, $aConfiguration)
|
||||||
{
|
{
|
||||||
echo "<div class='squ_bullet' style='background-color: red;' title='" . $this->translate(
|
echo "<div class='squ_bullet' style='background-color: red;' title='" . $this->translate('RequNotSucc') .
|
||||||
'RequNotSucc'
|
"'></div>" . $this->_addToggleScript($aResult, $sElementId) .
|
||||||
) . "'></div>" . $this->_addToggleScript($aResult, $sElementId) . $this->translate(
|
$this->translate($sCheckType, $aConfiguration) . "<br>" . PHP_EOL;
|
||||||
$sCheckType,
|
|
||||||
$aConfiguration
|
|
||||||
) . "<br>" . PHP_EOL;
|
|
||||||
|
|
||||||
$this->getSubDirItems($aResult, $sElementId);
|
$this->getSubDirItems($aResult, $sElementId);
|
||||||
}
|
}
|
||||||
@ -638,10 +636,7 @@ EOT;
|
|||||||
echo "<div class='squ_bullet' style='background-color: green;' title='" .
|
echo "<div class='squ_bullet' style='background-color: green;' title='" .
|
||||||
$this->translate('RequSucc') . "'></div>" .
|
$this->translate('RequSucc') . "'></div>" .
|
||||||
$this->_addToggleScript($aResult, $sElementId) .
|
$this->_addToggleScript($aResult, $sElementId) .
|
||||||
$this->translate(
|
$this->translate($sCheckType, $aConfiguration) . "<br>" . PHP_EOL;
|
||||||
$sCheckType,
|
|
||||||
$aConfiguration
|
|
||||||
) . "<br>" . PHP_EOL;
|
|
||||||
|
|
||||||
$this->getSubDirItems($aResult, $sElementId);
|
$this->getSubDirItems($aResult, $sElementId);
|
||||||
}
|
}
|
||||||
@ -654,9 +649,7 @@ EOT;
|
|||||||
{
|
{
|
||||||
echo "<div class='squ_bullet' style='background-color: orange;' title='" .
|
echo "<div class='squ_bullet' style='background-color: orange;' title='" .
|
||||||
$this->translate('RequNotCheckable') . "'></div>" .
|
$this->translate('RequNotCheckable') . "'></div>" .
|
||||||
$this->translate($sCheckType, $aConfiguration) . " (" . $this->translate(
|
$this->translate($sCheckType, $aConfiguration) . " (" . $this->translate('RequNotCheckable') . ")<br>";
|
||||||
'RequNotCheckable'
|
|
||||||
) . ")<br>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -669,13 +662,11 @@ EOT;
|
|||||||
echo "<div style='margin-left: 20px; display: none;' id='" . $sElementId . "'>";
|
echo "<div style='margin-left: 20px; display: none;' id='" . $sElementId . "'>";
|
||||||
foreach ($aResult as $sPath => $blResult) {
|
foreach ($aResult as $sPath => $blResult) {
|
||||||
if (!$blResult) {
|
if (!$blResult) {
|
||||||
echo "<div class='squ_bullet' style='background-color: red;' title='" . $this->translate(
|
echo "<div class='squ_bullet' style='background-color: red;' title='" .
|
||||||
'RequNotSucc'
|
$this->translate('RequNotSucc') . "'></div>" . $sPath . "<br>";
|
||||||
) . "'></div>" . $sPath . "<br>";
|
|
||||||
} else {
|
} else {
|
||||||
echo "<div class='squ_bullet' style='background-color: green;' title='" . $this->translate(
|
echo "<div class='squ_bullet' style='background-color: green;' title='" .
|
||||||
'RequSucc'
|
$this->translate('RequSucc') . "'></div>" . $sPath . "<br>";
|
||||||
) . "'></div>" . $sPath . "<br>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</div>" . PHP_EOL;
|
echo "</div>" . PHP_EOL;
|
||||||
@ -782,7 +773,8 @@ class requTranslations
|
|||||||
return array(
|
return array(
|
||||||
'de' => array(
|
'de' => array(
|
||||||
'RequCheck' => 'Mindestanforderungsprüfung',
|
'RequCheck' => 'Mindestanforderungsprüfung',
|
||||||
'ExecNotice' => 'Führen Sie diese Prüfung immer aus dem Stammverzeichnis Ihres Shops aus. Nur dann können die Prüfungen erfolgreich durchgeführt werden.',
|
'ExecNotice' => 'Führen Sie diese Prüfung immer aus dem Stammverzeichnis Ihres Shops aus. '.
|
||||||
|
'Nur dann können die Prüfungen erfolgreich durchgeführt werden.',
|
||||||
'RequSucc' => 'Bedingung erfüllt',
|
'RequSucc' => 'Bedingung erfüllt',
|
||||||
'RequNotSucc' => 'Bedingung nicht erfüllt',
|
'RequNotSucc' => 'Bedingung nicht erfüllt',
|
||||||
'RequNotCheckable' => 'Bedingung nicht prüfbar',
|
'RequNotCheckable' => 'Bedingung nicht prüfbar',
|
||||||
@ -796,17 +788,22 @@ class requTranslations
|
|||||||
'hasMaxShopVersion' => 'maximal Shop Version %s',
|
'hasMaxShopVersion' => 'maximal Shop Version %s',
|
||||||
'hasMinModCfgVersion' => 'ModCfg-Eintrag "%s" (%s) mit mindestens Version %s',
|
'hasMinModCfgVersion' => 'ModCfg-Eintrag "%s" (%s) mit mindestens Version %s',
|
||||||
'hasMaxModCfgVersion' => 'ModCfg-Eintrag "%s" (%s) mit maximal Version %s',
|
'hasMaxModCfgVersion' => 'ModCfg-Eintrag "%s" (%s) mit maximal Version %s',
|
||||||
'hasModCfg' => '<a href="http://www.oxidmodule.com/Connector" target="Connector">Modul-Connector</a> installiert',
|
'hasModCfg' => '<a href="http://www.oxidmodule.com/Connector" target="Connector">Modul-'.
|
||||||
|
'Connector</a> installiert',
|
||||||
'isShopEdition' => 'ist Shopedition %s',
|
'isShopEdition' => 'ist Shopedition %s',
|
||||||
'hasZendLoaderOptimizer' => 'Zend Optimizer (PHP 5.2) oder Zend Guard Loader (PHP 5.3, 5.4) installiert',
|
'hasZendLoaderOptimizer' => 'Zend Optimizer (PHP 5.2) oder Zend Guard Loader (PHP 5.3, 5.4) '.
|
||||||
|
'installiert',
|
||||||
'hasIonCubeLoader' => 'ionCube loader installiert',
|
'hasIonCubeLoader' => 'ionCube loader installiert',
|
||||||
'globalSuccess' => 'Die Prüfung war erfolgreich. Sie können das Modul installieren.*<br><br>',
|
'globalSuccess' => 'Die Prüfung war erfolgreich. Sie können das Modul installieren.*<br><br>',
|
||||||
'globalNotSuccess' => 'Die Prüfung war nicht erfolgreich. Bitte kontrollieren Sie die rot markierten Bedingungen.<br><br>',
|
'globalNotSuccess' => 'Die Prüfung war nicht erfolgreich. Bitte kontrollieren Sie die rot '.
|
||||||
'deleteFile1' => 'Löschen Sie diese Datei nach der Verwendung bitte unbedingt wieder von Ihrem Server! Klicken Sie <a href="',
|
'markierten Bedingungen.<br><br>',
|
||||||
|
'deleteFile1' => 'Löschen Sie diese Datei nach der Verwendung bitte unbedingt wieder von '.
|
||||||
|
'Ihrem Server! Klicken Sie <a href="',
|
||||||
'deleteFile2' => '?fnc=deleteme">hier</a>, um diese Datei zu löschen.',
|
'deleteFile2' => '?fnc=deleteme">hier</a>, um diese Datei zu löschen.',
|
||||||
'showPhpInfo' => 'PHPinfo anzeigen',
|
'showPhpInfo' => 'PHPinfo anzeigen',
|
||||||
'dependentoffurther' => '* abhängig von ungeprüften Voraussetzungen',
|
'dependentoffurther' => '* abhängig von ungeprüften Voraussetzungen',
|
||||||
'oneandonedescription' => '** geprüft wurde das Ausführungsverzeichnis, providerabhängig müssen Unterverzeichnisse separat geprüft werden (z.B. bei 1&1)',
|
'oneandonedescription' => '** geprüft wurde das Ausführungsverzeichnis, providerabhängig müssen '.
|
||||||
|
'Unterverzeichnisse separat geprüft werden (z.B. bei 1&1)',
|
||||||
'or' => ' oder ',
|
'or' => ' oder ',
|
||||||
'toggleswitch' => 'Klick für Details zur Prüfung',
|
'toggleswitch' => 'Klick für Details zur Prüfung',
|
||||||
'unableDeleteFile' => 'Datei konnte nicht gelöscht werden. Bitte löschen Sie diese manuell.',
|
'unableDeleteFile' => 'Datei konnte nicht gelöscht werden. Bitte löschen Sie diese manuell.',
|
||||||
@ -814,7 +811,8 @@ class requTranslations
|
|||||||
),
|
),
|
||||||
'en' => array(
|
'en' => array(
|
||||||
'RequCheck' => 'Requirement check',
|
'RequCheck' => 'Requirement check',
|
||||||
'ExecNotice' => 'Execute this check script in the root directory of your shop. In this case only checks can executed succesfully.',
|
'ExecNotice' => 'Execute this check script in the root directory of your shop. In this '.
|
||||||
|
'case only checks can executed succesfully.',
|
||||||
'RequSucc' => 'condition is fulfilled',
|
'RequSucc' => 'condition is fulfilled',
|
||||||
'RequNotSucc' => 'condition isn\'t fulfilled',
|
'RequNotSucc' => 'condition isn\'t fulfilled',
|
||||||
'RequNotCheckable' => 'condition isn\'t checkable',
|
'RequNotCheckable' => 'condition isn\'t checkable',
|
||||||
@ -828,17 +826,21 @@ class requTranslations
|
|||||||
'hasMaxShopVersion' => 'not more than shop version %s',
|
'hasMaxShopVersion' => 'not more than shop version %s',
|
||||||
'hasMinModCfgVersion' => 'ModCfg item "%s" (%s) has at least version %s',
|
'hasMinModCfgVersion' => 'ModCfg item "%s" (%s) has at least version %s',
|
||||||
'hasMaxModCfgVersion' => 'ModCfg item "%s" (%s) has not more than version %s',
|
'hasMaxModCfgVersion' => 'ModCfg item "%s" (%s) has not more than version %s',
|
||||||
'hasModCfg' => '<a href="http://www.oxidmodule.com/Connector" target="Connector">Module Connector</a> installed',
|
'hasModCfg' => '<a href="http://www.oxidmodule.com/Connector" target="Connector">Module '.
|
||||||
|
'Connector</a> installed',
|
||||||
'isShopEdition' => 'shop edition is %s',
|
'isShopEdition' => 'shop edition is %s',
|
||||||
'hasZendLoaderOptimizer' => 'Zend Optimizer (PHP 5.2) or Zend Guard Loader (PHP 5.3, 5.4) installed',
|
'hasZendLoaderOptimizer' => 'Zend Optimizer (PHP 5.2) or Zend Guard Loader (PHP 5.3, 5.4) installed',
|
||||||
'hasIonCubeLoader' => 'ionCube loader installed',
|
'hasIonCubeLoader' => 'ionCube loader installed',
|
||||||
'globalSuccess' => 'The test was successful. Your server is ready for installing the module.*<br><br>',
|
'globalSuccess' => 'The test was successful. Your server is ready for installing the '.
|
||||||
'globalNotSuccess' => 'The test wasn\'t successfull. Please check the red marked conditions.<br><br>',
|
'module.*<br><br>',
|
||||||
|
'globalNotSuccess' => 'The test wasn\'t successfull. Please check the red marked '.
|
||||||
|
'conditions.<br><br>',
|
||||||
'deleteFile1' => 'Please delete this file after use on your server! Click <a href="',
|
'deleteFile1' => 'Please delete this file after use on your server! Click <a href="',
|
||||||
'deleteFile2' => '?fnc=deleteme">here</a>, to delete this file.',
|
'deleteFile2' => '?fnc=deleteme">here</a>, to delete this file.',
|
||||||
'showPhpInfo' => 'show PHPinfo',
|
'showPhpInfo' => 'show PHPinfo',
|
||||||
'dependentoffurther' => '* dependent of further unchecked conditions',
|
'dependentoffurther' => '* dependent of further unchecked conditions',
|
||||||
'oneandonedescription' => '** this check use execution directory only, provider dependend subdirectories have to check separately (e.g. at 1&1)',
|
'oneandonedescription' => '** this check use execution directory only, provider dependend '.
|
||||||
|
'subdirectories have to check separately (e.g. at 1&1)',
|
||||||
'or' => ' or ',
|
'or' => ' or ',
|
||||||
'toggleswitch' => 'click for details',
|
'toggleswitch' => 'click for details',
|
||||||
'unableDeleteFile' => 'Unable to delete file. Please delete it manually.',
|
'unableDeleteFile' => 'Unable to delete file. Please delete it manually.',
|
||||||
@ -874,8 +876,7 @@ class requRemote
|
|||||||
/** @var stdClass $oModuleData */
|
/** @var stdClass $oModuleData */
|
||||||
$oModuleData = $this->_getRemoteServerData($sUrl);
|
$oModuleData = $this->_getRemoteServerData($sUrl);
|
||||||
|
|
||||||
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release))
|
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release)) {
|
||||||
{
|
|
||||||
return explode(',', $oModuleData->moduleversion->compatible_release->shopedition);
|
return explode(',', $oModuleData->moduleversion->compatible_release->shopedition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -899,8 +900,7 @@ class requRemote
|
|||||||
/** @var stdClass $oModuleData */
|
/** @var stdClass $oModuleData */
|
||||||
$oModuleData = $this->_getRemoteServerData($sUrl);
|
$oModuleData = $this->_getRemoteServerData($sUrl);
|
||||||
|
|
||||||
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release))
|
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release)) {
|
||||||
{
|
|
||||||
return $this->shortenVersion($oModuleData->moduleversion->compatible_release->fromshopversion);
|
return $this->shortenVersion($oModuleData->moduleversion->compatible_release->fromshopversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -924,8 +924,7 @@ class requRemote
|
|||||||
/** @var stdClass $oModuleData */
|
/** @var stdClass $oModuleData */
|
||||||
$oModuleData = $this->_getRemoteServerData($sUrl);
|
$oModuleData = $this->_getRemoteServerData($sUrl);
|
||||||
|
|
||||||
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release))
|
if ($oModuleData->status == 'OK' && isset($oModuleData->moduleversion->compatible_release)) {
|
||||||
{
|
|
||||||
return $this->shortenVersion($oModuleData->moduleversion->compatible_release->toshopversion);
|
return $this->shortenVersion($oModuleData->moduleversion->compatible_release->toshopversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -970,8 +969,8 @@ class requRemote
|
|||||||
|
|
||||||
if (extension_loaded('curl') &&
|
if (extension_loaded('curl') &&
|
||||||
function_exists('curl_init') && function_exists('curl_exec') &&
|
function_exists('curl_init') && function_exists('curl_exec') &&
|
||||||
$ch = curl_init())
|
$ch = curl_init()
|
||||||
{
|
) {
|
||||||
$sCurl_URL = preg_replace('@^((http|https)://)@', '', $sFilePath);
|
$sCurl_URL = preg_replace('@^((http|https)://)@', '', $sFilePath);
|
||||||
curl_setopt($ch, CURLOPT_URL, $sCurl_URL);
|
curl_setopt($ch, CURLOPT_URL, $sCurl_URL);
|
||||||
if ($_SERVER['HTTP_USER_AGENT']) {
|
if ($_SERVER['HTTP_USER_AGENT']) {
|
||||||
@ -1097,11 +1096,8 @@ class requTests
|
|||||||
{
|
{
|
||||||
$aResult[$this->getBasePath()] = false;
|
$aResult[$this->getBasePath()] = false;
|
||||||
|
|
||||||
if ((version_compare(phpversion(), $aConfiguration['aParams']['from'], '>=')) && (version_compare(
|
if ((version_compare(phpversion(), $aConfiguration['aParams']['from'], '>=')) &&
|
||||||
phpversion(),
|
(version_compare(phpversion(), $aConfiguration['aParams']['to'], '<'))
|
||||||
$aConfiguration['aParams']['to'],
|
|
||||||
'<'
|
|
||||||
))
|
|
||||||
) {
|
) {
|
||||||
$aResult[$this->getBasePath()] = true;
|
$aResult[$this->getBasePath()] = true;
|
||||||
}
|
}
|
||||||
@ -1163,7 +1159,12 @@ class requTests
|
|||||||
$oEditionResult = $this->_getShopEdition();
|
$oEditionResult = $this->_getShopEdition();
|
||||||
$sEdition = strtoupper($oEditionResult->oxedition);
|
$sEdition = strtoupper($oEditionResult->oxedition);
|
||||||
|
|
||||||
$mMinRemoteVersion = $this->oRemote->getMinShopVersion($this->oConfig->sModId, $this->oConfig->sModVersion, $sEdition);
|
$mMinRemoteVersion = $this->oRemote->getMinShopVersion(
|
||||||
|
$this->oConfig->sModId,
|
||||||
|
$this->oConfig->sModVersion,
|
||||||
|
$sEdition
|
||||||
|
);
|
||||||
|
|
||||||
if ($mMinRemoteVersion) {
|
if ($mMinRemoteVersion) {
|
||||||
$aConfiguration['aParams'] = array('version' => $mMinRemoteVersion);
|
$aConfiguration['aParams'] = array('version' => $mMinRemoteVersion);
|
||||||
} else {
|
} else {
|
||||||
@ -1194,7 +1195,12 @@ class requTests
|
|||||||
$oEditionResult = $this->_getShopEdition();
|
$oEditionResult = $this->_getShopEdition();
|
||||||
$sEdition = strtoupper($oEditionResult->oxedition);
|
$sEdition = strtoupper($oEditionResult->oxedition);
|
||||||
|
|
||||||
$mMaxRemoteVersion = $this->oRemote->getMaxShopVersion($this->oConfig->sModId, $this->oConfig->sModVersion, $sEdition);
|
$mMaxRemoteVersion = $this->oRemote->getMaxShopVersion(
|
||||||
|
$this->oConfig->sModId,
|
||||||
|
$this->oConfig->sModVersion,
|
||||||
|
$sEdition
|
||||||
|
);
|
||||||
|
|
||||||
if ($mMaxRemoteVersion) {
|
if ($mMaxRemoteVersion) {
|
||||||
$aConfiguration['aParams'] = array('version' => $mMaxRemoteVersion);
|
$aConfiguration['aParams'] = array('version' => $mMaxRemoteVersion);
|
||||||
} else {
|
} else {
|
||||||
@ -1219,7 +1225,12 @@ class requTests
|
|||||||
if ($this->getDb()) {
|
if ($this->getDb()) {
|
||||||
$oResult = $this->_getShopEdition();
|
$oResult = $this->_getShopEdition();
|
||||||
|
|
||||||
$mRemoteShopEditions = $this->oRemote->getShopEdition($this->oConfig->sModId, $this->oConfig->sModVersion, $oResult->oxedition);
|
$mRemoteShopEditions = $this->oRemote->getShopEdition(
|
||||||
|
$this->oConfig->sModId,
|
||||||
|
$this->oConfig->sModVersion,
|
||||||
|
$oResult->oxedition
|
||||||
|
);
|
||||||
|
|
||||||
if (is_array($mRemoteShopEditions)) {
|
if (is_array($mRemoteShopEditions)) {
|
||||||
$aConfiguration['aParams'][0] = $mRemoteShopEditions;
|
$aConfiguration['aParams'][0] = $mRemoteShopEditions;
|
||||||
}
|
}
|
||||||
@ -1279,8 +1290,10 @@ class requTests
|
|||||||
public function hasMinModCfgVersion(&$aConfiguration)
|
public function hasMinModCfgVersion(&$aConfiguration)
|
||||||
{
|
{
|
||||||
if ($this->getDb()) {
|
if ($this->getDb()) {
|
||||||
$sSelect = "SELECT IF (INET_ATON(oxversion) >= INET_ATON('" . $aConfiguration['aParams']['version'] . "'), 1, 0) AS result
|
$sSelect = "SELECT IF ".
|
||||||
FROM d3_cfg_mod WHERE
|
"(INET_ATON(oxversion) >= INET_ATON('" . $aConfiguration['aParams']['version'] . "'), 1, 0) AS result ".
|
||||||
|
"FROM d3_cfg_mod ".
|
||||||
|
"WHERE
|
||||||
oxmodid = '" . $aConfiguration['aParams']['id'] . "' AND
|
oxmodid = '" . $aConfiguration['aParams']['id'] . "' AND
|
||||||
oxversion != 'basic'
|
oxversion != 'basic'
|
||||||
ORDER BY oxversion ASC LIMIT 1";
|
ORDER BY oxversion ASC LIMIT 1";
|
||||||
@ -1337,9 +1350,7 @@ class requTests
|
|||||||
{
|
{
|
||||||
$aResult = array($this->getBasePath() => false);
|
$aResult = array($this->getBasePath() => false);
|
||||||
|
|
||||||
if (
|
if ((version_compare(phpversion(), '5.2.0', '>=') &&
|
||||||
(
|
|
||||||
version_compare(phpversion(), '5.2.0', '>=') &&
|
|
||||||
version_compare(phpversion(), '5.2.900', '<') &&
|
version_compare(phpversion(), '5.2.900', '<') &&
|
||||||
function_exists('zend_optimizer_version')
|
function_exists('zend_optimizer_version')
|
||||||
) || (
|
) || (
|
||||||
@ -1373,6 +1384,77 @@ class requTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class requTransformation
|
||||||
|
*/
|
||||||
|
class requTransformation
|
||||||
|
{
|
||||||
|
public $oCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param requCheck $oCheck
|
||||||
|
*/
|
||||||
|
public function __construct(requCheck $oCheck)
|
||||||
|
{
|
||||||
|
$this->oCheck = $oCheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $aCheckList
|
||||||
|
*/
|
||||||
|
public function transformCheckList($aCheckList)
|
||||||
|
{
|
||||||
|
$this->_removeDeprecatedLibs($aCheckList['hasMinModCfgVersion']);
|
||||||
|
$this->_removeDeprecatedLibs($aCheckList['hasMaxModCfgVersion']);
|
||||||
|
|
||||||
|
return $aCheckList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $aCheck
|
||||||
|
*/
|
||||||
|
protected function _removeDeprecatedLibs(&$aCheck)
|
||||||
|
{
|
||||||
|
$blDelOldLibs = false;
|
||||||
|
$sCheckVersion = 0;
|
||||||
|
|
||||||
|
if (is_array($aCheck)) {
|
||||||
|
$sSelect = "SELECT oxversion as result ".
|
||||||
|
"FROM d3_cfg_mod ".
|
||||||
|
"WHERE oxmodid = 'd3modcfg_lib' LIMIT 1";
|
||||||
|
$rResult = mysql_query($sSelect, $this->oCheck->getDb());
|
||||||
|
if (is_resource($rResult)) {
|
||||||
|
$oResult = mysql_fetch_object($rResult);
|
||||||
|
if ($oResult->result) {
|
||||||
|
$sCheckVersion = $oResult->result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($aCheck as $aModCfgCheck) {
|
||||||
|
if (isset($aModCfgCheck['aParams']['id']) &&
|
||||||
|
strtolower($aModCfgCheck['aParams']['id']) == 'd3modcfg_lib' &&
|
||||||
|
version_compare($sCheckVersion, '4.0.0.0', '>=')
|
||||||
|
) {
|
||||||
|
$blDelOldLibs = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
reset($aCheck);
|
||||||
|
|
||||||
|
if ($blDelOldLibs) {
|
||||||
|
$aOldLibs = array('d3install_lib', 'd3log_lib', 'd3clrtmp_lib');
|
||||||
|
foreach ($aCheck as $sKey => $aModCfgCheck) {
|
||||||
|
if (isset($aModCfgCheck['aParams']['id']) &&
|
||||||
|
in_array(strtolower($aModCfgCheck['aParams']['id']), $aOldLibs)
|
||||||
|
) {
|
||||||
|
unset($aCheck[$sKey]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $mVar
|
* @param $mVar
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user