* Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ require_once __DIR__ . '/../../../../../app/bootstrap.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); try { $objectManager = $bootstrap->getObjectManager(); /** @var $configModel \Magento\Framework\App\Config\ReinitableConfigInterface */ $configModel = $objectManager->get('Magento\\Framework\\App\\Config\\ReinitableConfigInterface'); $configModel->reinit(); $config = []; foreach (glob(__DIR__ . '/AliasesMap/cms_content_tables_*.php', GLOB_BRACE) as $configFile) { $config = array_merge($config, include $configFile); } foreach ($config as $table => $field) { updateFieldForTable($objectManager, $table, $field); } } catch (\Exception $e) { echo "Make sure that you launch this script with Magento 2 configured sources. \n\n"; echo $e->getMessage(); } /** * Replace {{skin url=""}} with {{view url=""}} for given table field * * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param string $table * @param string $col * @return void */ function updateFieldForTable($objectManager, $table, $col) {
* @category Tools * @package system_configuration * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require_once __DIR__ . '/../../../app/bootstrap.php'; Mage::setIsDeveloperMode(true); try { Mage::getConfig()->cleanCache(); Mage::getConfig()->reinit(); $config = array(); foreach (glob(dirname(__FILE__) . '/aliases_map/cms_content_tables_*.php', GLOB_BRACE) as $configFile) { $config = array_merge($config, include $configFile); } foreach ($config as $table => $field) { updateFieldForTable($table, $field); } } catch (Exception $e) { echo "Make sure that you launch this script with Magento 2 configured sources. \n\n"; echo $e->getMessage(); } /** * Replace {{skin url=""}} with {{view url=""}} for given table field * * @param string $table * @param string $col */ function updateFieldForTable($table, $col) { /** @var $installer Mage_Core_Model_Resource_Setup */ $installer = Mage::getResourceModel('Mage_Core_Model_Resource_Setup', array('resourceName' => 'core_setup'));