[-] BO : Configuration link does not appear if configuration is not available + fix on shop importer variable
This commit is contained in:
@@ -81,7 +81,7 @@ abstract class ImportModuleCore extends Module
|
||||
{
|
||||
$modules = Module::getModulesOnDisk(true);
|
||||
foreach ($modules as $key => $module)
|
||||
if (get_parent_class($module) != 'ImportModule')
|
||||
if (!isset($module->parent_class) || $module->parent_class != 'ImportModule')
|
||||
unset($modules[$key]);
|
||||
return $modules;
|
||||
}
|
||||
|
||||
+4
-2
@@ -1020,7 +1020,8 @@ abstract class ModuleCore
|
||||
$item->description = $tmp_module->description;
|
||||
$item->author = $tmp_module->author;
|
||||
$item->limited_countries = $tmp_module->limited_countries;
|
||||
$item->is_configurable = isset($tmp_module->is_configurable) ? $tmp_module->is_configurable : 1;
|
||||
$item->parent_class = get_parent_class($module);
|
||||
$item->is_configurable = method_exists($tmp_module, 'getContent') ? 1 : 0;
|
||||
$item->need_instance = isset($tmp_module->need_instance) ? $tmp_module->need_instance : 0;
|
||||
$item->active = $tmp_module->active;
|
||||
$item->currencies = isset($tmp_module->currencies) ? $tmp_module->currencies : null;
|
||||
@@ -1095,6 +1096,7 @@ abstract class ModuleCore
|
||||
$item->description = strip_tags((string)$modaddons->description);
|
||||
$item->author = strip_tags((string)$modaddons->author);
|
||||
$item->limited_countries = array();
|
||||
$item->parent_class = '';
|
||||
$item->is_configurable = 0;
|
||||
$item->need_instance = 0;
|
||||
$item->not_on_disk = 1;
|
||||
@@ -1540,7 +1542,7 @@ abstract class ModuleCore
|
||||
<description><![CDATA['.Tools::htmlentitiesUTF8($this->description).']]></description>
|
||||
<author><![CDATA['.Tools::htmlentitiesUTF8($this->author).']]></author>
|
||||
<tab><![CDATA['.Tools::htmlentitiesUTF8($this->tab).']]></tab>'.(isset($this->confirmUninstall) ? "\n\t".'<confirmUninstall>'.$this->confirmUninstall.'</confirmUninstall>' : '').'
|
||||
<is_configurable>'.(int)method_exists($this, 'getContent').'</is_configurable>
|
||||
<is_configurable>'.(int)$this->is_configurable.'</is_configurable>
|
||||
<need_instance>'.(int)$this->need_instance.'</need_instance>'.(isset($this->limited_countries) ? "\n\t".'<limited_countries>'.(count($this->limited_countries) == 1 ? $this->limited_countries[0] : '').'</limited_countries>' : '').'
|
||||
</module>';
|
||||
if (is_writable(_PS_MODULE_DIR_.$this->name.'/'))
|
||||
|
||||
@@ -815,7 +815,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
if ($module->id && $module->active)
|
||||
$return .= (!empty($result) ? '|' : '').' <span class="reset-module"><a class="action_module" '.(method_exists($module, 'onclickOption')? 'onclick="'.$module->onclickOption('reset', $href).'"' : '').' href="'.self::$currentIndex.'&token='.$this->token.'&module_name='.urlencode($module->name).'&reset&tab_module='.$module->tab.'">'.$this->translationsTab['Reset'].'</a></span>';
|
||||
|
||||
if ($module->id && (method_exists($module, 'getContent') || (isset($module->is_configurable) && $module->is_configurable)))
|
||||
if ($module->id && isset($module->is_configurable) && $module->is_configurable)
|
||||
$return .= (!empty($result) ? '|' : '').' <span class="configure-module"><a class="action_module" '.(method_exists($module, 'onclickOption')? 'onclick="'.$module->onclickOption('configure', $href).'"' : '').' href="'.self::$currentIndex.'&configure='.urlencode($module->name).'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.urlencode($module->name).'">'.$this->translationsTab['Configure'].'</a></span>';
|
||||
|
||||
$hrefDelete = self::$currentIndex.'&delete='.urlencode($module->name).'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.urlencode($module->name);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<description><![CDATA[Generate your Google sitemap file]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[seo]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
Reference in New Issue
Block a user