Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -4493,7 +4493,7 @@ class ProductCore extends ObjectModel
|
||||
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
|
||||
/**
|
||||
* Webservice getter : get virtual field default combination
|
||||
*
|
||||
|
||||
@@ -292,15 +292,17 @@ abstract class ModuleCore
|
||||
else
|
||||
{
|
||||
if (!$upgrade_detail['number_upgraded'])
|
||||
$this->_errors[] = $this->l('None upgrades have been applied');
|
||||
$this->_errors[] = $this->l('No upgrade has been applied');
|
||||
else
|
||||
{
|
||||
$this->_errors[] = $this->l('Upgraded from: ').$upgrade_detail['upgraded_from'].$this->l(' to ').
|
||||
$upgrade_detail['upgraded_to'];
|
||||
$this->_errors[] = sprintf($this->l('Upgraded from: %S to %s'), $upgrade_detail['upgraded_from'], $upgrade_detail['upgraded_to']);
|
||||
$this->_errors[] = $upgrade_detail['number_upgrade_left'].' '.$this->l('upgrade left');
|
||||
}
|
||||
|
||||
$this->_errors[] = $this->l('To prevent any problem, this module has been turned off');
|
||||
if ($upgrade_detail['duplicate'])
|
||||
$this->_errors[] = sprintf(Tools::displayError('Module %s cannot be upgraded this time: please refresh this page to update it.'), $this->name);
|
||||
else
|
||||
$this->_errors[] = $this->l('To prevent any problem, this module has been turned off');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,19 +350,21 @@ abstract class ModuleCore
|
||||
$upgrade = &self::$modules_cache[$this->name]['upgrade'];
|
||||
foreach ($upgrade['upgrade_file_left'] as $num => $file_detail)
|
||||
{
|
||||
// Default variable required in the included upgrade file need to be set by default there:
|
||||
// upgrade_version, success_upgrade
|
||||
$upgrade_result = false;
|
||||
if (function_exists($file_detail['upgrade_function']))
|
||||
{
|
||||
$upgrade['success'] = false;
|
||||
$upgrade['duplicate'] = true;
|
||||
break;
|
||||
}
|
||||
include($file_detail['file']);
|
||||
|
||||
// Call the upgrade function if defined
|
||||
$upgrade['success'] = false;
|
||||
if (function_exists($file_detail['upgrade_function']))
|
||||
$upgrade_result = $file_detail['upgrade_function']($this);
|
||||
|
||||
$upgrade['success'] = $upgrade_result;
|
||||
$upgrade['success'] = $file_detail['upgrade_function']($this);
|
||||
|
||||
// Set detail when an upgrade succeed or failed
|
||||
if ($upgrade_result)
|
||||
if ($upgrade['success'])
|
||||
{
|
||||
$upgrade['number_upgraded'] += 1;
|
||||
$upgrade['upgraded_to'] = $file_detail['version'];
|
||||
@@ -378,6 +382,7 @@ abstract class ModuleCore
|
||||
}
|
||||
|
||||
$upgrade['number_upgrade_left'] = count($upgrade['upgrade_file_left']);
|
||||
|
||||
// Update module version in DB with the last succeed upgrade
|
||||
if ($upgrade['upgraded_to'])
|
||||
Module::upgradeModuleVersion($this->name, $upgrade['upgraded_to']);
|
||||
@@ -396,9 +401,9 @@ abstract class ModuleCore
|
||||
public static function upgradeModuleVersion($name, $version)
|
||||
{
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'module` m
|
||||
SET m.version = \''.bqSQL($version).'\'
|
||||
WHERE m.name = \''.bqSQL($name).'\'');
|
||||
UPDATE `'._DB_PREFIX_.'module` m
|
||||
SET m.version = \''.bqSQL($version).'\'
|
||||
WHERE m.name = \''.bqSQL($name).'\'');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
|
||||
$this->smarty = $smarty;
|
||||
|
||||
// header informations
|
||||
$this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
|
||||
$this->date = Tools::displayDate($this->order_slip->date_add, (int)$this->order->id_lang);
|
||||
$this->title = HTMLTemplateOrderSlip::l('Slip #').Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id).sprintf('%06d', (int)$this->order_slip->id);
|
||||
|
||||
// footer informations
|
||||
|
||||
@@ -630,9 +630,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
|
||||
if (!$download_ok)
|
||||
$this->errors[] = $this->l('Error on downloading the lastest version');
|
||||
else
|
||||
if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
|
||||
elseif (!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -674,18 +673,18 @@ class AdminModulesControllerCore extends AdminController
|
||||
|
||||
// Get the return value of current method
|
||||
$echo = $module->{$method}();
|
||||
|
||||
|
||||
// After a successful install of a single module that has a configuration method, to the configuration page
|
||||
if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent'))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12');
|
||||
}
|
||||
|
||||
|
||||
// If the method called is "configure" (getContent method), we show the html code of configure page
|
||||
if ($key == 'configure' && Module::isInstalled($module->name))
|
||||
{
|
||||
if (isset($module->multishop_context))
|
||||
$this->multishop_context = $module->multishop_context;
|
||||
|
||||
|
||||
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
|
||||
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;
|
||||
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang=';
|
||||
@@ -768,10 +767,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||
}
|
||||
|
||||
if(isset($_GET['update']))
|
||||
{
|
||||
if (isset($_GET['update']))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||
}
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
@@ -779,7 +776,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
// Parent Post Process
|
||||
parent::postProcess();
|
||||
|
||||
|
||||
// Get the list of installed module ans prepare it for ajax call.
|
||||
if (($list = Tools::getValue('installed_modules')))
|
||||
Context::getContext()->smarty->assign('installed_modules', Tools::jsonEncode(explode('|', $list)));
|
||||
|
||||
@@ -3579,7 +3579,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
protected function getCarrierList()
|
||||
{
|
||||
$carrier_list = Carrier::getCarriers($this->context->language->id, false, false, false, null, Carrier::ALL_CARRIERS);
|
||||
$carrier_list = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::ALL_CARRIERS);
|
||||
if ($product = $this->loadObject(true))
|
||||
{
|
||||
$carrier_selected_list = $product->getCarriers();
|
||||
|
||||
@@ -2518,7 +2518,7 @@ class BlockLayered extends Module
|
||||
'.($alias_where == 'p' ? '' : 'product_shop.*,' ).'
|
||||
'.$alias_where.'.id_category_default,
|
||||
pl.*,
|
||||
i.id_image,
|
||||
image_shop.`id_image`,
|
||||
il.legend,
|
||||
m.name manufacturer_name,
|
||||
DATEDIFF('.$alias_where.'.`date_add`, DATE_SUB(NOW(), INTERVAL '.(int)$nb_day_new_product.' DAY)) > 0 AS new
|
||||
@@ -2527,10 +2527,11 @@ class BlockLayered extends Module
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product`
|
||||
'.$join.'
|
||||
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').' AND pl.id_lang = '.(int)$cookie->id_lang.')
|
||||
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
|
||||
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).')
|
||||
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'.Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$cookie->id_lang.')
|
||||
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
|
||||
WHERE '.$alias_where.'.`active` = 1 AND
|
||||
WHERE (i.id_image IS NULL OR image_shop.id_shop='.(int)Context::getContext()->shop->id.')
|
||||
AND '.$alias_where.'.`active` = 1 AND
|
||||
'.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.'
|
||||
AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).'
|
||||
AND c.active = 1
|
||||
@@ -2651,7 +2652,7 @@ class BlockLayered extends Module
|
||||
AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).'
|
||||
AND c.active = 1
|
||||
AND '.$alias.'.active = 1';
|
||||
$sql_query['group'] = ' GROUP BY p.id_manufacturer ';
|
||||
$sql_query['group'] = ' GROUP BY p.id_manufacturer ORDER BY m.name';
|
||||
|
||||
if (!Configuration::get('PS_LAYERED_HIDE_0_VALUES'))
|
||||
{
|
||||
@@ -2668,7 +2669,7 @@ class BlockLayered extends Module
|
||||
AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).'
|
||||
AND c.active = 1
|
||||
AND '.$alias.'.active = 1
|
||||
GROUP BY p.id_manufacturer';
|
||||
GROUP BY p.id_manufacturer ORDER BY m.name';
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blocklayered</name>
|
||||
<displayName><![CDATA[Bloc navigation à facettes]]></displayName>
|
||||
<displayName><![CDATA[Layered navigation block]]></displayName>
|
||||
<version><![CDATA[1.8.9]]></version>
|
||||
<description><![CDATA[Affiche un bloc avec les filtres de la navigation à facettes]]></description>
|
||||
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* block myaccount */
|
||||
.myaccount ul {margin-bottom:10px}
|
||||
.myaccount li {border-bottom: 1px solid #eee}
|
||||
.myaccount ul {margin-bottom:10px;}
|
||||
.myaccount .bullet .icon {display: none;}
|
||||
.myaccount li {border-bottom: 1px solid #eee;}
|
||||
.myaccount li a {
|
||||
display: block;
|
||||
padding: 7px 11px 5px 22px;
|
||||
@@ -10,16 +11,14 @@
|
||||
.myaccount p.logout {
|
||||
padding-bottom:0;
|
||||
font-weight:bold;
|
||||
text-align:right
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
/* block myaccount in footer */
|
||||
#footer .myaccount .title_block, #footer .myaccount h4 {background: none;}
|
||||
#footer .myaccount .logout {display:none;}
|
||||
#footer .myaccount .title_block, #footer .myaccount h4 {
|
||||
padding:0 0 10px 0;
|
||||
background:none
|
||||
background:none;
|
||||
}
|
||||
#footer .myaccount ul {margin-bottom:0}
|
||||
#footer .myaccount li {border-bottom:none}
|
||||
@@ -27,7 +26,6 @@
|
||||
display: block;
|
||||
padding:0;
|
||||
color: #fff;
|
||||
background: none
|
||||
}
|
||||
#footer .myaccount li.lnk_wishlist img {display:none
|
||||
background: none;
|
||||
}
|
||||
#footer .myaccount li.lnk_wishlist img {display:none;}
|
||||
@@ -16,9 +16,9 @@ function upgrade_module_1_2_1($object)
|
||||
|
||||
function homeslider_stripslashes_field($field)
|
||||
{
|
||||
$quotes = array('\'\\\\\'\'', '\'\\\'\'');
|
||||
$dquotes = array('\'\\"\'', '\'"\'');
|
||||
$backslashes = array('\'\\\\\'', '\'\\\'');
|
||||
$quotes = array('"\\\'"', '"\'"');
|
||||
$dquotes = array('\'\\\\"\'', '\'"\'');
|
||||
$backslashes = array('"\\\\\\\\"', '"\\\\"');
|
||||
|
||||
return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')';
|
||||
}
|
||||
Reference in New Issue
Block a user