[-] BO : AdminModules - Fix on GetModulesOnDisk and general ergonomy

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10434 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny committed 2011-11-22 14:53:58 +00:00
1 parent 4b15da6656
commit c68c8be6e8
4 files changed
+6 -8

No files matched your search

@@ -25,6 +25,7 @@
*} *}
<!--start filter module--> <!--start filter module-->
<style>.ac_results { border:1px solid #C2C4D9; }</style>
<div class="filter-module"> <div class="filter-module">
<form id="filternameForm" method="post"> <form id="filternameForm" method="post">
<input type="text" value="" name="filtername" autocomplete="off" class="ac_input"> <input type="text" value="" name="filtername" autocomplete="off" class="ac_input">
+1 -1
View File
@@ -75,7 +75,7 @@
<div class="filter-module" id="addons_login_div"> <div class="filter-module" id="addons_login_div">
<form id="addons_login_form" method="post"> <form id="addons_login_form" method="post">
{l s='Login Addons'} : <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input"> {l s='Login Addons'} : <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
{l s= 'Password Addons'} : <input type="text" value="" id="password_addons" autocomplete="off" class="ac_input"> {l s= 'Password Addons'} : <input type="password" value="" id="password_addons" autocomplete="off" class="ac_input">
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}"> <input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
<span id="addons_loading" style="color:red"></span> <span id="addons_loading" style="color:red"></span>
</form> </form>
+1 -1
View File
@@ -697,7 +697,7 @@ abstract class ModuleCore
$item->description = $tmpModule->description; $item->description = $tmpModule->description;
$item->author = $tmpModule->author; $item->author = $tmpModule->author;
$item->limited_countries = $tmpModule->limited_countries; $item->limited_countries = $tmpModule->limited_countries;
$item->is_configurable = isset($tmpModule->is_configurable) ? $tmpModule->is_configurable : 0; $item->is_configurable = isset($tmpModule->is_configurable) ? $tmpModule->is_configurable : 1;
$item->need_instance = isset($tmpModule->need_instance) ? $tmpModule->need_instance : 0; $item->need_instance = isset($tmpModule->need_instance) ? $tmpModule->need_instance : 0;
$item->active = $tmpModule->active; $item->active = $tmpModule->active;
unset($tmpModule); unset($tmpModule);
+3 -6
View File
@@ -486,7 +486,7 @@ class AdminModulesControllerCore extends AdminController
if ($modules) if ($modules)
foreach ($modules AS $name) foreach ($modules AS $name)
{ {
// If Addons Module // If Addons module, download and unzip it before installing it
if ($this->logged_on_addons && !is_dir('../modules/'.$name.'/')) if ($this->logged_on_addons && !is_dir('../modules/'.$name.'/'))
{ {
$file = _PS_ROOT_DIR_.'/config/default_customer_modules_list.xml'; $file = _PS_ROOT_DIR_.'/config/default_customer_modules_list.xml';
@@ -495,17 +495,14 @@ class AdminModulesControllerCore extends AdminController
$content = Tools::file_get_contents($file); $content = Tools::file_get_contents($file);
$xml = @simplexml_load_string($content, NULL, LIBXML_NOCDATA); $xml = @simplexml_load_string($content, NULL, LIBXML_NOCDATA);
foreach ($xml->module as $modaddons) foreach ($xml->module as $modaddons)
{
if ($name == $modaddons->name && isset($modaddons->id)) if ($name == $modaddons->name && isset($modaddons->id))
{ if (@copy($this->addons_url.'module/'.pSQL($modaddons->id).'/'.pSQL(trim($this->context->cookie->username_addons)).'/'.pSQL(trim($this->context->cookie->password_addons)), '../modules/'.$this->name.'.zip'))
@copy($this->addons_url.'module/'.pSQL($modaddons->id).'/'.pSQL(trim($this->context->cookie->username_addons)).'/'.pSQL(trim($this->context->cookie->password_addons)), '../modules/'.$this->name.'.zip');
$this->extractArchive('../modules/'.$this->name.'.zip'); $this->extractArchive('../modules/'.$this->name.'.zip');
} }
}
}
} }
// Check potential error
if (!($module = Module::getInstanceByName(urldecode($name)))) if (!($module = Module::getInstanceByName(urldecode($name))))
$this->_errors[] = $this->l('module not found'); $this->_errors[] = $this->l('module not found');
elseif ($key == 'install' AND $this->tabAccess['add'] !== '1') elseif ($key == 'install' AND $this->tabAccess['add'] !== '1')