private static function updateModule()
    {
        /** @var \OxidEsales\Eshop\Core\Config $oConfig */
        $oConfig = Registry::getConfig();

        /** @var Module $oModule */
        $oModule = oxNew(Module::class);
        $oModule->load('ddoewysiwyg');

        $sCurrentVersion = $oModule->getInfo('version');
        $sInstalledVersion = $oConfig->getShopConfVar('iInstallledVersion', $oConfig->getShopId(), 'module:ddoewysiwyg');

        if (!$sInstalledVersion || version_compare($sInstalledVersion, $sCurrentVersion, '<')) {
            if (self::$__aUpdateSQLs) {
                foreach (self::$__aUpdateSQLs as $sUpdateVersion => $aSQLs) {
                    if (!$sInstalledVersion || version_compare($sUpdateVersion, $sInstalledVersion, '>')) {
                        self::executeSQLs($aSQLs);
                    }
                }
            }

            $oConfig->saveShopConfVar('str', 'iInstallledVersion', $sCurrentVersion, $oConfig->getShopId(), 'module:ddoewysiwyg');
        }
    }
private static function updateModule()
    {
        /** @var \OxidEsales\Eshop\Core\Config $oConfig */
        $oConfig = Registry::getConfig();

        /** @var Module $oModule */
        $oModule = oxNew(Module::class);
        $oModule->load('ddoewysiwyg');

        $sCurrentVersion = $oModule->getInfo('version');
        $sInstalledVersion = $oConfig->getShopConfVar('iInstallledVersion', $oConfig->getShopId(), 'module:ddoewysiwyg');

        if (!$sInstalledVersion || version_compare($sInstalledVersion, $sCurrentVersion, '<')) {
            if (self::$__aUpdateSQLs) {
                foreach (self::$__aUpdateSQLs as $sUpdateVersion => $aSQLs) {
                    if (!$sInstalledVersion || version_compare($sUpdateVersion, $sInstalledVersion, '>')) {
                        self::executeSQLs($aSQLs);
                    }
                }
            }

            $oConfig->saveShopConfVar('str', 'iInstallledVersion', $sCurrentVersion, $oConfig->getShopId(), 'module:ddoewysiwyg');
        }
    }
private static function updateModule ( ) { /** @var \OxidEsales\Eshop\Core\Config $oConfig */ $ oConfig = Registry :: getConfig ( ) ; /** @var Module $oModule */ $ oModule = oxNew ( Module :: class ) ; $ oModule -> load ( 'ddoewysiwyg' ) ; $ sCurrentVersion = $ oModule -> getInfo ( 'version' ) ; $ sInstalledVersion = $ oConfig -> getShopConfVar ( 'iInstallledVersion' , $ oConfig -> getShopId ( ) , 'module:ddoewysiwyg' ) ; if ( ! $ sInstalledVersion || version_compare ( $ sInstalledVersion , $ sCurrentVersion , '<' ) ) { if ( self :: $ __aUpdateSQLs ) { foreach ( self :: $ __aUpdateSQLs as $ sUpdateVersion => $ aSQLs ) { if ( ! $ sInstalledVersion || version_compare ( $ sUpdateVersion , $ sInstalledVersion , '>' ) ) { self :: executeSQLs ( $ aSQLs ) ; } } } $ oConfig -> saveShopConfVar ( 'str' , 'iInstallledVersion' , $ sCurrentVersion , $ oConfig -> getShopId ( ) , 'module:ddoewysiwyg' ) ; } }
Updates module if it was already installed.
Updates module if it was already installed .