diff --git a/admin-dev/themes/default/template/controllers/modules/content.tpl b/admin-dev/themes/default/template/controllers/modules/content.tpl index 3a3afc34a..58546be45 100644 --- a/admin-dev/themes/default/template/controllers/modules/content.tpl +++ b/admin-dev/themes/default/template/controllers/modules/content.tpl @@ -23,7 +23,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - {if isset($module_content)} {$module_content} {else} diff --git a/admin-dev/themes/default/template/controllers/modules/filters.tpl b/admin-dev/themes/default/template/controllers/modules/filters.tpl index 683885d67..dae64da67 100644 --- a/admin-dev/themes/default/template/controllers/modules/filters.tpl +++ b/admin-dev/themes/default/template/controllers/modules/filters.tpl @@ -25,36 +25,26 @@ {if $add_permission eq '1'} {if isset($logged_on_addons)} -
-

{l s='You are logged into PrestaShop Addons.'}

-
-
- {else} - {if $check_url_fopen eq 'ko' OR $check_openssl eq 'ko'} -
{l s='If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:'}
{if $check_url_fopen eq 'ko'}- {l s='Enable allow_url_fopen'}
{/if} {if $check_openssl eq 'ko'}- {l s='Enable php openSSL extension'}
{/if}
- {else} -
-

{l s='Do you have a %s account?' sprintf='PrestaShop Addons'}

@@ -62,67 +52,59 @@
-
- {/if} - {/if} +
 
{/if} - - -
-
- - -
+ + +
+
+ + +
+
+
+ - - -
- - - -   - -   - -   - - -
- -
- - -
- - - -
- + +   + +   + +   + +
+
+ + +
+ +
+ diff --git a/admin-dev/themes/default/template/controllers/modules/header.tpl b/admin-dev/themes/default/template/controllers/modules/header.tpl index bc318a690..9d290bf06 100644 --- a/admin-dev/themes/default/template/controllers/modules/header.tpl +++ b/admin-dev/themes/default/template/controllers/modules/header.tpl @@ -23,27 +23,23 @@ * International Registered Trademark & Property of PrestaShop SA *} -
-
- - - - -
-

Module : {l s='List of modules'}

-
- +
+
+ +
+

Module : {l s='List of modules'}

+
{if $add_permission eq '1'}
diff --git a/admin-dev/themes/default/template/controllers/modules/js.tpl b/admin-dev/themes/default/template/controllers/modules/js.tpl index a7c8d1237..b0bc45df2 100644 --- a/admin-dev/themes/default/template/controllers/modules/js.tpl +++ b/admin-dev/themes/default/template/controllers/modules/js.tpl @@ -1,373 +1,327 @@ -{* -* 2007-2013 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 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/afl-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 -* @copyright 2007-2013 PrestaShop SA - -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - - - + \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl index 5ed6b0612..ff01f4620 100644 --- a/admin-dev/themes/default/template/controllers/modules/list.tpl +++ b/admin-dev/themes/default/template/controllers/modules/list.tpl @@ -1,122 +1,115 @@ -{* -* 2007-2013 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 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/afl-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 -* @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - - {if count($modules)} - - - - - - - - - - - - - - - - {foreach from=$modules item=module} - - - - - - - {/foreach} - -
-
-
{l s='Module name'}
- {if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'} - confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if} - class="noborder"> - {/if} - -
-

{$module->displayName} - {if isset($module->type) && $module->type == 'addonsMustHave'} - {l s='Must Have'} - {else} - {if isset($module->id) && $module->id gt 0} - {l s='Installed'} - {else} - {l s='Not installed'} - {/if} - {/if} -

- -

{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}

- {if isset($module->message)}
{$module->message}
{/if} -
- {if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if} -
-
-
- -
- -
- - -
- {else} -

{l s='No modules available in this section.'}

- {/if} - +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 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/afl-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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if count($modules)} + + + + + + + + + + {foreach from=$modules item=module} + + + + + + + {/foreach} + +
+
+
{l s='Module name'}
+ {if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'} + confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if} + class="noborder"> + {/if} + +
+

{$module->displayName} + {if isset($module->type) && $module->type == 'addonsMustHave'} + {l s='Must Have'} + {else} + {if isset($module->id) && $module->id gt 0} + {l s='Installed'} + {else} + {l s='Not installed'} + {/if} + {/if} +

+ +

{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}

+ {if isset($module->message)}
{$module->message}
{/if} +
+ {if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if} +
+
+
+ +
+ +
+ + +
+{else} +

{l s='No modules available in this section.'}

+{/if} diff --git a/admin-dev/themes/default/template/controllers/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl index 0ce3a4390..9eaa78feb 100644 --- a/admin-dev/themes/default/template/controllers/modules/page.tpl +++ b/admin-dev/themes/default/template/controllers/modules/page.tpl @@ -24,14 +24,12 @@ *}
- {include file='controllers/modules/header.tpl'} {include file='controllers/modules/filters.tpl'}
@@ -58,10 +56,8 @@
-
{include file='controllers/modules/list.tpl'}
-
diff --git a/classes/module/Module.php b/classes/module/Module.php index 73e3c4c35..41a3c9c80 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -1164,10 +1164,10 @@ abstract class ModuleCore $item->active = 0; if (isset($modaddons->img)) { - if (!file_exists('../img/tmp/'.md5($modaddons->name).'.jpg')) - if (!@copy($modaddons->img, '../img/tmp/'.md5($modaddons->name).'.jpg')) - @copy('../img/404.gif', '../img/tmp/'.md5($modaddons->name).'.jpg'); - if (file_exists('../img/tmp/'.md5($modaddons->name).'.jpg')) + if (!file_exists(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg')) + if (!file_put_contents(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) + copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg'); + if (file_exists(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg')) $item->image = '../img/tmp/'.md5($modaddons->name).'.jpg'; } if ($item->type == 'addonsMustHave') @@ -1178,10 +1178,10 @@ abstract class ModuleCore foreach ($prices as $currency => $price) if ($id_currency = Currency::getIdByIsoCode($currency)) { - $item->price = (float)$price; - $item->id_currency = (int)$id_currency; - if ($id_default_currency == $id_currency) - break; + $item->price = (float)$price; + $item->id_currency = (int)$id_currency; + if ($id_default_currency == $id_currency) + break; } } $module_list[] = $item; diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 50c848784..0a1dae094 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -26,7 +26,6 @@ class AdminModulesControllerCore extends AdminController { - /* ** @var array map with $_GET keywords and their callback */