// merge 1.4 (5916) => 1.5.x
This commit is contained in:
@@ -37,6 +37,7 @@ validShopInfos = false;
|
||||
upgradeCertify = false;
|
||||
dropdb=false;
|
||||
application="install";
|
||||
customModule="desactivate";
|
||||
|
||||
function nextTab()
|
||||
{
|
||||
@@ -838,7 +839,7 @@ function doUpgrade()
|
||||
url: "model.php",
|
||||
cache: false,
|
||||
data:
|
||||
"method=doUpgrade"
|
||||
"method=doUpgrade&customModule=" + customModule+ ""
|
||||
,
|
||||
success: function(ret)
|
||||
{
|
||||
@@ -1028,5 +1029,13 @@ $(document).ready(
|
||||
$('#set_license').click(function() {
|
||||
checkLicenseButton(this);
|
||||
});
|
||||
$("#customModuleDesactivation").bind('click',
|
||||
function(){
|
||||
if($("#customModuleDesactivation")[0].checked)
|
||||
customModule = 'desactivate';
|
||||
else
|
||||
customModule = 'take the risk';
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
+42
-5
@@ -826,9 +826,43 @@ if ($lm->getIncludeTradFilename())
|
||||
{
|
||||
return strnatcmp($a['version'], $b['version']);
|
||||
}
|
||||
$countNonNative = 0;
|
||||
if ($oldversion !== false)
|
||||
{
|
||||
include_once(realpath(INSTALL_PATH.'/../config').'/settings.inc.php');
|
||||
include_once(realpath(INSTALL_PATH.'/../config').'/config.inc.php');
|
||||
$moduleList = Module::getNonNativeModuleList();
|
||||
$moduleNonNativeLi = '<ul>';
|
||||
foreach($moduleList as $module)
|
||||
if($module['active'])
|
||||
{
|
||||
$countNonNative++;
|
||||
$moduleNonNativeLi .= '<li>'.$module['name'].'</li>';
|
||||
}
|
||||
$moduleNonNativeLi .= '</ul>';
|
||||
}
|
||||
if($countNonNative)
|
||||
{
|
||||
echo '<br /><br />
|
||||
<h2>'.lang('Module compatibility').'</h2>';
|
||||
echo '<div style="font-weight: bold; background-color: #ffdeb7; color: #000; padding: 10px; border: 1px solid #999; margin-top: 10px;">
|
||||
<p><img src="../img/admin/warning.gif" alt="" style="vertical-align: middle;" /> '.lang('It\'s dangerous to keep non-native modules activated during the update. If you really want to take this risk, uncheck the following box.').'</p>
|
||||
</div>
|
||||
<p>'.lang('You will be able to manually reactivate them in your back-office, once the update process has succeeded.').'</p>
|
||||
<input id="customModuleDesactivation" type="checkbox" checked="checked" value="1" name="customModuleDesactivation" /> <label for="customModuleDesactivation">'
|
||||
.lang('Ok, please desactivate the following modules, I will reactivate them later.').' : </label>';
|
||||
echo $moduleNonNativeLi;
|
||||
|
||||
}
|
||||
|
||||
echo '<h2>'.lang('Theme compatibility').'</h2>';
|
||||
echo '<p>'.lang('Before updating, you need to check that your theme is compatible with version').' <b>'.INSTALL_VERSION.'</b> '.lang('of PrestaShop.').'</p>
|
||||
<p><b>'.lang('In this aim, use our').'</b> <a target="_blank" href="http://validator.prestashop.com?version='.INSTALL_VERSION.'" title="'.lang('Link to the validator').'"><b>'.lang('Online Theme Validator').'</b></a>.'.'</p>';
|
||||
echo '<p>'.lang('If your theme is not valid, you may experience some problems in your front-office aspect, but don\'t panic ! To solve this, you can make it compatible by correcting the validators errors or by using a theme compatible with ').' '.INSTALL_VERSION.' '.lang('version').'.</p>';
|
||||
|
||||
echo '<br /><br />
|
||||
<h2>'.lang('Details about this upgrade').' (v'.INSTALL_VERSION.')</h2>
|
||||
echo '<h2>'.lang('Let\'s go!').'</h2>
|
||||
<p>'.lang('Click on the "Next" button to start the upgrade, this can take several minutes,').' <u style="font-weight: bold; text-decoration: underline;">'.lang('do not close the window and be patient.').'</u></p>';
|
||||
echo '<h2>'.lang('Details about this upgrade').' (v'.INSTALL_VERSION.')</h2>
|
||||
<p>'.
|
||||
lang('Thank you, you will be able to continue the upgrade process by clicking on the "Next" button.').'<br /><br />'.
|
||||
lang('PrestaShop is upgrading your shop one version after the other, the following upgrade files will be processed:').'
|
||||
@@ -938,10 +972,8 @@ if ($lm->getIncludeTradFilename())
|
||||
echo '<img src="../img/admin/error2.png" alt="" style="vertical-align: middle;" /> '.lang('We strongly recommend that you inform your hosting provider to modify the settings before process to the update.');
|
||||
|
||||
echo '
|
||||
</div><br />
|
||||
</div><br />';
|
||||
|
||||
<h2>'.lang('Let\'s go!').'</h2>
|
||||
<p>'.lang('Click on the "Next" button to start the upgrade, this can take several minutes,').' <u style="font-weight: bold; text-decoration: underline;">'.lang('do not close the window and be patient.').'</u></p>';
|
||||
|
||||
?>
|
||||
</div>
|
||||
@@ -1034,6 +1066,11 @@ if ($lm->getIncludeTradFilename())
|
||||
<span class="description"><?php echo lang('Find your store as your future customers will see!'); ?></span>
|
||||
<span class="message"><?php echo lang('Discover your store'); ?></span>
|
||||
</a>
|
||||
<span href="#" id="access" class="BO" target="_blank">
|
||||
<span class="title"><?php echo lang('Back Office'); ?></span>
|
||||
<span class="description"><?php echo lang('Manage your store with your back office. Manage your orders and customers, add modules, change your theme, etc...'); ?></span>
|
||||
<span class="message"><?php echo lang('Manage your store'); ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
|
||||
|
||||
@@ -267,4 +267,19 @@ $_LANG['Your update is completed!'] = 'Votre mise à jour est terminée !';
|
||||
$_LANG['Your shop version is now'] = 'La version de votre boutique est maintenant';
|
||||
$_LANG['New features in PrestaShop v'] = 'Nouvelles fonctionnalités dans PrestaShop v';
|
||||
$_LANG['Beware, your settings look correct but are not optimal, if you encounter problems (upgrade too long, memory error...), please ask your hosting provider to increase the values of these parameters (max_execution_time & memory_limit).'] = 'Attention, votre paramètres semblent corrects mais ne sont pas optimaux, si jamais vous rencontrez des soucis (mise à jour qui se bloque avant la fin, erreur de mémoire...), merci de demander à votre hébergeur d\'augmenter les valeurs de ces paramètres (max_execution_time & memory_limit).';
|
||||
$_LANG['We strongly recommend that you inform your hosting provider to modify the settings before process to the update.'] = 'Nous vous recommandons fortement de prévenir votre hébergeur avant de procéder à la mise à jour afin qu\'il modifie ces paramètres PHP.';
|
||||
$_LANG['We strongly recommend that you inform your hosting provider to modify the settings before process to the update.'] = 'Nous vous recommandons fortement de prévenir votre hébergeur avant de procéder à la mise à jour afin qu\'il modifie ces paramètres PHP.';
|
||||
$_LANG['Module compatibility'] = 'Compatibilité Modules';
|
||||
$_LANG['It\'s dangerous to keep non-native modules activated during the update. If you really want to take this risk, uncheck the following box.'] = 'Il est déconseillé de laisser les modules non natif activé durant la mise à jour? Si vous voulez réellement prendre ce risque, désactivez la case suivante.';
|
||||
$_LANG['You will be able to manually reactivate them in your back-office, once the update process has succeeded.'] = 'Vous pourrez ensuite les réactiver manuellement dans le back-office, une fois le processus de mise à jour terminé.';
|
||||
$_LANG['Ok, please desactivate the following modules, I will reactivate them later.'] = 'D\'accord, désactivez automatiquement les modules suivant, je les réactiverait moi-même plus tard.';
|
||||
$_LANG['Theme compatibility'] = 'Compatibilité du thème';
|
||||
$_LANG['Before updating, you need to check that your theme is compatible with version'] = 'Avant la mise à jour, vous avez besoin de vérifier que votre thème reste compatible avec la version';
|
||||
$_LANG['of PrestaShop.'] = 'de PrestaShop';
|
||||
$_LANG['Link to the validator'] = 'Lien vers le validateur';
|
||||
$_LANG['Online Theme Validator'] = 'Validateur de Theme en ligne';
|
||||
$_LANG['If your theme is not valid, you may experience some problems in your front-office aspect, but don\'t panic ! To solve this, you can make it compatible by correcting the validators errors or by using a theme compatible with '] = 'Si votre thème n\'est pas valide, vous pourrez rencontrer quelques problèmes d\'affichage de votre site, mais inutile de paniquer ! Vous pouvez le rendre compatible en corrigeant les erreurs signalées par le validateur ou en utilisant un thème compatible avec la version' ;
|
||||
$_LANG['version'] = '';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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: 1.4 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
function desactivate_custom_modules()
|
||||
{
|
||||
// Get all modules then select only payment ones
|
||||
$arrInstalledModules = Module::getModulesInstalled();
|
||||
// get native module list
|
||||
$module_list_xml = INSTALL_PATH.'/../config/modules_list.xml';
|
||||
$nativeModules = simplexml_load_file($module_list_xml);
|
||||
$nativeModules = $nativeModules->modules;
|
||||
if ($nativeModules['type'] == 'native')
|
||||
{
|
||||
foreach ($nativeModules->module as $module)
|
||||
$arrNativeModules[] = $module['name'].'';
|
||||
}
|
||||
$uninstallMe = array("rien");
|
||||
foreach($arrInstalledModules as $aModule)
|
||||
{
|
||||
if(!in_array($aModule['name'],$arrNativeModules))
|
||||
{
|
||||
$uninstallMe[] = $aModule['name'];
|
||||
}
|
||||
}
|
||||
Module::disableByName($uninstallMe);
|
||||
foreach ($modules AS $module)
|
||||
{
|
||||
$file = _PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php';
|
||||
if (!file_exists($file))
|
||||
continue;
|
||||
$fd = fopen($file, 'r');
|
||||
if (!$fd)
|
||||
continue ;
|
||||
$content = fread($fd, filesize($file));
|
||||
if (preg_match_all('/extends PaymentModule/U', $content, $matches))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'module_country` (id_module, id_country)
|
||||
SELECT '.(int)($module['id_module']).', id_country FROM `'._DB_PREFIX_.'country` WHERE active = 1');
|
||||
Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'module_currency` (id_module, id_currency)
|
||||
SELECT '.(int)($module['id_module']).', id_currency FROM `'._DB_PREFIX_.'currency` WHERE deleted = 0');
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -801,7 +801,7 @@ INSERT INTO `PREFIX_meta_lang` (`id_meta`, `id_lang`, `title`, `description`, `k
|
||||
(5, 4, 'Hersteller', 'Herstellerliste', 'Hersteller', 'hersteller'),
|
||||
(6, 4, 'Neue Produkte', 'Unsere neuen Produkte', 'neu, Produkte', 'neue-Produkte'),
|
||||
(7, 4, 'Kennwort vergessen', 'Geben Sie die E-Mailadresse ein, die Sie zum Einloggen benutzen, damit Sie eine E-Mail mit dem neuen Kennwort erhalt', 'vergessen, Kennwort, E-Mail, neu, Reset', 'kennwort-wiederherstellung'),
|
||||
(8, 4, 'Preise fallen', 'Unsere Sonderangebote', 'besonders, Preise fallen', 'preise-fallen'),
|
||||
(8, 4, 'Angebote', 'Unsere Sonderangebote', 'besonders, Angebote', 'angebote'),
|
||||
(9, 4, 'Sitemap', 'Verloren? Finden Sie, was Sie suchen', 'sitemap', 'sitemap'),
|
||||
(10, 4, 'Zulieferer', 'Zuliefererliste', 'Zulieferer', 'zulieferer'),
|
||||
(11, 4, 'Adresse', '', '', 'adresse'),
|
||||
|
||||
@@ -19,4 +19,9 @@ UPDATE `PREFIX_cms_lang` set link_rewrite = "uber-uns" where link_rewrite like "
|
||||
|
||||
ALTER TABLE `PREFIX_connections` CHANGE `ip_address` `ip_address` BIGINT NULL DEFAULT NULL;
|
||||
|
||||
|
||||
UPDATE `PREFIX_meta_lang`
|
||||
SET `title` = 'Angebote', `keywords` = 'besonders, Angebote', `url_rewrite` = 'angebote' WHERE url_rewrite = 'preise-fallen';
|
||||
|
||||
|
||||
/* PHP:alter_cms_block(); */;
|
||||
|
||||
@@ -541,7 +541,7 @@ div#noJavaScript{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a#access, a#access_update{
|
||||
a#access, a#access_update, span#box_admin{
|
||||
display:block;
|
||||
width:300px;
|
||||
height:150px;
|
||||
|
||||
@@ -33,7 +33,8 @@ if (function_exists('date_default_timezone_set'))
|
||||
|
||||
define('_PS_MODULE_DIR_', realpath(INSTALL_PATH).'/../modules/');
|
||||
define('_PS_INSTALLER_PHP_UPGRADE_DIR_', 'php/');
|
||||
|
||||
// desactivate non-native module
|
||||
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'desactivatecustommodules.php');
|
||||
// utf-8 conversion if needed (before v0.9.8.1 utf-8 was badly supported)
|
||||
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'utf8.php');
|
||||
// Configuration cleaner in order to get unique configuration names
|
||||
@@ -196,6 +197,9 @@ if(!defined('_MYSQL_ENGINE_'))
|
||||
define('_MYSQL_ENGINE_', 'MyISAM');
|
||||
|
||||
$sqlContent = '';
|
||||
if(isset($_GET['customModule']) AND $_GET['customModule'] == 'desactivate')
|
||||
desactivate_custom_modules();
|
||||
|
||||
foreach($neededUpgradeFiles AS $version)
|
||||
{
|
||||
$file = INSTALL_PATH.'/sql/upgrade/'.$version.'.sql';
|
||||
|
||||
Reference in New Issue
Block a user