source/Core/DbMetaDataHandler.php
public function updateViews($tables = null)
    {
        set_time_limit(0);

        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $configFile = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class);

        $originalSkipViewUsageStatus = $configFile->getVar('blSkipViewUsage');
        $this->setConfigToDoNotUseViews($config);

        $this->safeGuardAdditionalMultiLanguageTables();

        $shops = $db->getAll("select * from oxshops");

        $tables = $tables ? $tables : $config->getConfigParam('aMultiShopTables');

        $success = true;
        foreach ($shops as $shopValues) {
            $shopId = $shopValues[0];
            $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
            $shop->load($shopId);
            $shop->setMultiShopTables($tables);
            $mallInherit = [];
            foreach ($tables as $table) {
                $mallInherit[$table] = $config->getShopConfVar('blMallInherit_' . $table, $shopId);
            }
            if (!$shop->generateViews(false, $mallInherit) && $success) {
                $success = false;
            }
        }

        $config->setConfigParam('blSkipViewUsage', $originalSkipViewUsageStatus);

        return $success;
    }
public function updateViews($tables = null)
    {
        set_time_limit(0);

        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $configFile = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class);

        $originalSkipViewUsageStatus = $configFile->getVar('blSkipViewUsage');
        $this->setConfigToDoNotUseViews($config);

        $this->safeGuardAdditionalMultiLanguageTables();

        $shops = $db->getAll("select * from oxshops");

        $tables = $tables ? $tables : $config->getConfigParam('aMultiShopTables');

        $success = true;
        foreach ($shops as $shopValues) {
            $shopId = $shopValues[0];
            $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
            $shop->load($shopId);
            $shop->setMultiShopTables($tables);
            $mallInherit = [];
            foreach ($tables as $table) {
                $mallInherit[$table] = $config->getShopConfVar('blMallInherit_' . $table, $shopId);
            }
            if (!$shop->generateViews(false, $mallInherit) && $success) {
                $success = false;
            }
        }

        $config->setConfigParam('blSkipViewUsage', $originalSkipViewUsageStatus);

        return $success;
    }
public function updateViews ( $ tables = null ) { set_time_limit ( 0 ) ; $ db = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ configFile = \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Core \ ConfigFile :: class ) ; $ originalSkipViewUsageStatus = $ configFile -> getVar ( 'blSkipViewUsage' ) ; $ this -> setConfigToDoNotUseViews ( $ config ) ; $ this -> safeGuardAdditionalMultiLanguageTables ( ) ; $ shops = $ db -> getAll ( "select * from oxshops" ) ; $ tables = $ tables ? $ tables : $ config -> getConfigParam ( 'aMultiShopTables' ) ; $ success = true ; foreach ( $ shops as $ shopValues ) { $ shopId = $ shopValues [ 0 ] ; $ shop = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Shop :: class ) ; $ shop -> load ( $ shopId ) ; $ shop -> setMultiShopTables ( $ tables ) ; $ mallInherit = [ ] ; foreach ( $ tables as $ table ) { $ mallInherit [ $ table ] = $ config -> getShopConfVar ( 'blMallInherit_' . $ table , $ shopId ) ; } if ( ! $ shop -> generateViews ( false , $ mallInherit ) && $ success ) { $ success = false ; } } $ config -> setConfigParam ( 'blSkipViewUsage' , $ originalSkipViewUsageStatus ) ; return $ success ; }
Updates all views

@param array $tables array of DB table name that can store different data per shop like oxArticle

@return bool
Updates all views