// fixing some upgrader bug, optimization (php files are now loaded automatically)
This commit is contained in:
@@ -1,4 +1,32 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7387 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_new_tab.php');
|
||||
|
||||
function add_stock_tab()
|
||||
{
|
||||
// Patch for the 1.0.1 sql update
|
||||
@@ -49,4 +77,4 @@ function add_stock_tab()
|
||||
'AdminStockConfiguration',
|
||||
'en:Configuration|fr:Configuration|es:Configuration|de:Configuration|it:Configuration',
|
||||
$id_parent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_new_tab.php');
|
||||
|
||||
function create_multistore()
|
||||
{
|
||||
$res = true;
|
||||
@@ -8,7 +10,14 @@ function create_multistore()
|
||||
foreach ($themes AS $theme)
|
||||
if (is_dir(dirname(__FILE__).'/../../themes/'.$theme) && $theme != '.' && $theme != '..' && $theme != 'prestashop')
|
||||
$res &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'theme (`id_theme`, `name`) VALUES(\'\', \''.pSQL($theme).'\')');
|
||||
$res &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'shop SET id_theme = (SELECT id_theme FROM '._DB_PREFIX_.'theme WHERE name=\''.pSQL(_THEME_NAME_).'\') WHERE id_shop = 1');
|
||||
$res &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'shop
|
||||
SET
|
||||
name = (SELECT value
|
||||
FROM '._DB_PREFIX_.'configuration
|
||||
WHERE name = "PS_SHOP_NAME"
|
||||
),
|
||||
id_theme = (SELECT id_theme FROM '._DB_PREFIX_.'theme WHERE name=\''.pSQL(_THEME_NAME_).'\')
|
||||
WHERE id_shop = 1');
|
||||
$shop_domain = Db::getInstance()->getValue('SELECT `value`
|
||||
FROM `'._DB_PREFIX_.'_configuration`
|
||||
WHERE `name`=\'PS_SHOP_DOMAIN\'');
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
function desactivate_custom_modules()
|
||||
function deactivate_custom_modules()
|
||||
{
|
||||
$db = Db::getInstance();
|
||||
$modulesDirOnDisk = Module::getModulesDirOnDisk();
|
||||
Reference in New Issue
Block a user