Skip to content

Commit

Permalink
unique disable modules
Browse files Browse the repository at this point in the history
- and remove useless null check
  • Loading branch information
keywan-ghadami-oxid committed Jul 18, 2018
1 parent 7ee06b5 commit 50b8fce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Core/ConfigExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function getConfigValues($aConfigFields, $blIncludeMode)
LEFT JOIN oxconfigdisplay as disp
ON cfg.oxmodule=disp.oxcfgmodule AND cfg.oxvarname=disp.oxcfgvarname
WHERE cfg.oxvarname $sIncludeMode IN ('%s') order by oxshopid asc, oxmodule ASC, oxvarname ASC";

$sSql = sprintf(
$sSql,
\oxRegistry::getConfig()->getDecodeValueQuery(),
Expand Down Expand Up @@ -323,6 +323,7 @@ protected function groupValues($aConfigValues)
if (in_array($sVarName, array('aDisabledModules'))) {
$mVarValue = array_values($mVarValue);
sort($mVarValue);
$mVarValue = array_values(array_unique($mVarValue));
}

//only export module info if the the order may be important
Expand Down Expand Up @@ -610,7 +611,7 @@ public function writeMetaConfigFile($aShops)

$this->writeDataToFile($this->getShopsConfigFileName(), $aMetaConfigFile);
}

private function varValueWithThemeDisplayInfo($sVarName, $mVarValue, $sVarType, $sVarConstraints, $sVarGrouping, $sVarPos)
{
if (!empty($sVarConstraints)||!empty($sVarPos)||!empty($sVarGrouping)) {
Expand Down
8 changes: 3 additions & 5 deletions Core/ConfigImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,10 @@ protected function importConfigValues($aConfigValues)

//fix state again because class chain was reset by the import above
//also onActivate call event can cause duplicate tpl blocks
if ($oModuleStateFixer != null) {
if (method_exists($oModuleStateFixer, 'setDebugOutput')) {
$oModuleStateFixer->setDebugOutput($this->getDebugOutput());
}
$oModuleStateFixer->fix($oModule);
if (method_exists($oModuleStateFixer, 'setDebugOutput')) {
$oModuleStateFixer->setDebugOutput($this->getDebugOutput());
}
$oModuleStateFixer->fix($oModule);

$sCurrentVersion = $oModule->getInfo("version");
if ($sCurrentVersion != $sVersion) {
Expand Down

0 comments on commit 50b8fce

Please sign in to comment.