// MERGE with 1.4 r7770
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -4,6 +4,7 @@ global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Import / Export eines Themas';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exportieren oder installieren Sie ein Thema und seine Module auf Ihren Shop';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_e10ed1f81b51bd4c7f86eeb84bcd1359'] = 'zip ist nicht auf Ihrem Server installiert. Erkundigen Sie sich bei Ihrem Provider.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Ein Fehler ist beim Hochladen der Datei aufgetreten.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Nur zip-Dateien sind erlaubt';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Ein Fehler ist beim Kopieren der Datei aufgetreten.';
|
||||
@@ -85,5 +86,3 @@ $_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Wählen Sie ein Thema';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Abbrechen';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Generieren Sie das Archiv jetzt!';
|
||||
|
||||
?>
|
||||
@@ -4,6 +4,7 @@ global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Importar / exportar un tema';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exportar o importar un tema y sus módulos en su tienda';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_e10ed1f81b51bd4c7f86eeb84bcd1359'] = 'Zip no está instalado en su servidor. Contacte con su hosting';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Se ha producido un error durante el envío del archivo.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Solo están autorizados los archivos zip';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Se ha producido un error durante la copia del archivo.';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -4,6 +4,7 @@ global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Importer / Exporter un thème';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exporter ou importer un thème et ses modules sur votre boutique';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_e10ed1f81b51bd4c7f86eeb84bcd1359'] = 'Zip n\'est pas installé sur votre serveur. Contactez votre hébergeur pour plus d\'informations.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Une erreur est survenue durant l\'envoi du fichier.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Seuls les fichiers zip sont autorisés';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Une erreur est survenue durant la copie du fichier.';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -4,6 +4,7 @@ global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Import / export di un tema';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Esportare o installare un tema ed i suoi moduli per il tuo negozio';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_e10ed1f81b51bd4c7f86eeb84bcd1359'] = 'zip non è installato sul tuo server. Chiedi al tuo host ulteriori informazioni.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Errore durante il caricamento del file.';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Solo i file zip sono ammessi';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Errore durante la copia dei file.';
|
||||
@@ -85,5 +86,3 @@ $_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Scegli un tema';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Annulla';
|
||||
$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Genera l\'archivio ora!';
|
||||
|
||||
?>
|
||||
@@ -49,6 +49,9 @@ class ThemeInstallator extends Module
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
set_time_limit(0);
|
||||
ini_set('memory_limit', '2G');
|
||||
|
||||
$this->name = 'themeinstallator';
|
||||
$this->version = '1.4';
|
||||
$this->author = 'PrestaShop';
|
||||
@@ -64,7 +67,7 @@ class ThemeInstallator extends Module
|
||||
|
||||
private function getTheNativeModules()
|
||||
{
|
||||
$xml = @simplexml_load_string(file_get_contents('http://www.prestashop.com/xml/modules_list.xml'));
|
||||
$xml = simplexml_load_string(Tools::file_get_contents('http://www.prestashop.com/xml/modules_list.xml'));
|
||||
$natives = array();
|
||||
if ($xml)
|
||||
foreach ($xml->modules as $row)
|
||||
@@ -74,7 +77,7 @@ class ThemeInstallator extends Module
|
||||
if (count($natives > 0))
|
||||
return $natives;
|
||||
// use this list if we can't contact the prestashop.com server
|
||||
$natives = array('bankwire', 'birthdaypresent', 'blockadvertising', 'blockbestsellers', 'blockcart', 'blockcategories',
|
||||
$natives = array('bankwire', 'birthdaypresent', 'blockadvertising', 'blockbestsellers', 'blockcart', 'blockcategories', 'blockcms',
|
||||
'blockcurrencies', 'blockinfos', 'blocklanguages', 'blocklink', 'blockmanufacturer', 'blockmyaccount', 'blocknewproducts',
|
||||
'blocknewsletter', 'blockpaymentlogo', 'blockpermanentlinks', 'blockrss', 'blocksearch', 'blockspecials', 'blocksupplier',
|
||||
'blocktags', 'blockuserinfo', 'blockvariouslinks', 'blockviewed', 'blockwishlist', 'canonicalurl', 'cashondelivery', 'cheque',
|
||||
@@ -89,21 +92,17 @@ class ThemeInstallator extends Module
|
||||
}
|
||||
|
||||
private function deleteDirectory($dirname)
|
||||
{
|
||||
self::cleanDirectory($dirname);
|
||||
rmdir($dirname);
|
||||
}
|
||||
private function cleanDirectory($dirname)
|
||||
{
|
||||
$files = scandir($dirname);
|
||||
foreach ($files as $file)
|
||||
if ($file != '.' AND $file != '..' AND $file != '.svn')
|
||||
if ($file != '.' AND $file != '..')
|
||||
{
|
||||
if (is_dir($dirname.'/'.$file))
|
||||
self::deleteDirectory($dirname.'/'.$file);
|
||||
elseif (file_exists($dirname.'/'.$file))
|
||||
unlink($dirname.'/'.$file);
|
||||
}
|
||||
rmdir($dirname);
|
||||
}
|
||||
|
||||
private function recurseCopy($src, $dst)
|
||||
@@ -149,7 +148,14 @@ class ThemeInstallator extends Module
|
||||
|
||||
private function deleteTmpFiles()
|
||||
{
|
||||
self::cleanDirectory(_IMPORT_FOLDER_);
|
||||
if (file_exists(_IMPORT_FOLDER_.'doc'))
|
||||
self::deleteDirectory(_IMPORT_FOLDER_.'doc');
|
||||
if (file_exists(_IMPORT_FOLDER_.XMLFILENAME))
|
||||
unlink(_IMPORT_FOLDER_.XMLFILENAME);
|
||||
if (file_exists(_IMPORT_FOLDER_.'modules'))
|
||||
self::deleteDirectory(_IMPORT_FOLDER_.'modules');
|
||||
if (file_exists(_IMPORT_FOLDER_.'themes'))
|
||||
self::deleteDirectory(_IMPORT_FOLDER_.'themes');
|
||||
if (file_exists(_EXPORT_FOLDER_.'archive.zip'))
|
||||
unlink(_EXPORT_FOLDER_.'archive.zip');
|
||||
}
|
||||
@@ -464,9 +470,16 @@ class ThemeInstallator extends Module
|
||||
$count = -1;
|
||||
while (isset($hookedModule[++$count]))
|
||||
if ($hookedModule[$count] == $row)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_shop`, `id_hook`, `position`)
|
||||
VALUES ('.(int)$obj->id.', '.$shopID.', '.(int)Hook::get($hook[$count]).', '.(int)$position[$count].')');
|
||||
if ($exceptions[$count])
|
||||
foreach ($exceptions[$count] as $file_name)
|
||||
Db::getInstance()->Execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`)
|
||||
VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', "'.pSQL($file_name).'")');
|
||||
}
|
||||
}
|
||||
if (($val = (int)(Tools::getValue('nativeModules'))) != 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user