diff --git a/admin-dev/themes/template/modules/list.tpl b/admin-dev/themes/template/modules/list.tpl
index e83ed0217..62c324e92 100644
--- a/admin-dev/themes/template/modules/list.tpl
+++ b/admin-dev/themes/template/modules/list.tpl
@@ -66,7 +66,7 @@
{l s='Description'} : {$module->description}
{if isset($module->message)}{$module->message}
{/if}
- {$module->optionsHtml}
+ {if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
diff --git a/classes/Module.php b/classes/Module.php
index d1462f28f..19336790e 100644
--- a/classes/Module.php
+++ b/classes/Module.php
@@ -1033,6 +1033,7 @@ abstract class ModuleCore
$item->limited_countries = array();
$item->is_configurable = 0;
$item->need_instance = 0;
+ $item->not_on_disk = 1;
$item->available_on_addons = 1;
$item->active = 0;
if (isset($modaddons->img))
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index ade1bfa9c..3a16f9708 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -263,7 +263,7 @@ class AdminModulesControllerCore extends AdminController
return $url;
}
- private function extractArchive($file)
+ private function extractArchive($file, $redirect = true)
{
$success = false;
if (substr($file, -4) == '.zip')
@@ -283,7 +283,7 @@ class AdminModulesControllerCore extends AdminController
}
@unlink($file);
- if ($success)
+ if ($success && $redirect)
Tools::redirectAdmin(self::$currentIndex.'&conf=8'.'&token='.$this->token);
}
@@ -506,7 +506,7 @@ class AdminModulesControllerCore extends AdminController
foreach ($xml->module as $modaddons)
if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0))
if (@copy($this->addons_url.'module/'.pSQL($modaddons->id).'/'.pSQL(trim($this->context->cookie->username_addons)).'/'.pSQL(trim($this->context->cookie->password_addons)), '../modules/'.$modaddons->name.'.zip'))
- $this->extractArchive('../modules/'.$modaddons->name.'.zip');
+ $this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
}
}
@@ -579,7 +579,6 @@ class AdminModulesControllerCore extends AdminController
}
// Display module configuration
- // TODO : Make something cleaner
$this->context->smarty->assign('module_content', $toolbar.'
'.$echo.'
'.$toolbar);
}
elseif($echo === true)