[*] BO : Addons modules are now downloaded and installed at the same time (when you click on install button)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11567 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -66,7 +66,7 @@
|
|||||||
<p class="desc">{l s='Description'} : {$module->description}</p>
|
<p class="desc">{l s='Description'} : {$module->description}</p>
|
||||||
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
||||||
<div class="row-actions-module">
|
<div class="row-actions-module">
|
||||||
{$module->optionsHtml}
|
{if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1033,6 +1033,7 @@ abstract class ModuleCore
|
|||||||
$item->limited_countries = array();
|
$item->limited_countries = array();
|
||||||
$item->is_configurable = 0;
|
$item->is_configurable = 0;
|
||||||
$item->need_instance = 0;
|
$item->need_instance = 0;
|
||||||
|
$item->not_on_disk = 1;
|
||||||
$item->available_on_addons = 1;
|
$item->available_on_addons = 1;
|
||||||
$item->active = 0;
|
$item->active = 0;
|
||||||
if (isset($modaddons->img))
|
if (isset($modaddons->img))
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function extractArchive($file)
|
private function extractArchive($file, $redirect = true)
|
||||||
{
|
{
|
||||||
$success = false;
|
$success = false;
|
||||||
if (substr($file, -4) == '.zip')
|
if (substr($file, -4) == '.zip')
|
||||||
@@ -283,7 +283,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
@unlink($file);
|
@unlink($file);
|
||||||
if ($success)
|
if ($success && $redirect)
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=8'.'&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&conf=8'.'&token='.$this->token);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,7 +506,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
foreach ($xml->module as $modaddons)
|
foreach ($xml->module as $modaddons)
|
||||||
if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0))
|
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'))
|
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
|
// Display module configuration
|
||||||
// TODO : Make something cleaner
|
|
||||||
$this->context->smarty->assign('module_content', $toolbar.'<div class="clear"> </div>'.$echo.'<div class="clear"> </div>'.$toolbar);
|
$this->context->smarty->assign('module_content', $toolbar.'<div class="clear"> </div>'.$echo.'<div class="clear"> </div>'.$toolbar);
|
||||||
}
|
}
|
||||||
elseif($echo === true)
|
elseif($echo === true)
|
||||||
|
|||||||
Reference in New Issue
Block a user