Commit 8e81cda6 authored by Gregory Roussac's avatar Gregory Roussac

Merge branch '1.6' of ssh://github.com/PrestaShop/PrestaShop into 1.6

parents 8cf57fce 3d8fb582
......@@ -50,8 +50,8 @@ else
$excludeIds = '';
// Excluding downloadable products from packs because download from pack is not supported
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', false);
$exclude_packs = (bool)Tools::getValue('exclude_packs', false);
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true);
$exclude_packs = (bool)Tools::getValue('exclude_packs', true);
$sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, p.`cache_default_attribute`
FROM `'._DB_PREFIX_.'product` p
......
......@@ -68,12 +68,14 @@
{if $host_mode}
<div class="alert alert-info">
<h4>{l s='How to restore a database backup'}</h4>
<ol>
<li>{l s='If you wish to restore a database backup, we invite you to open a support ticket on your [1]PrestaShop.com account[/1].' tags=['<a href="https://www.prestashop.com/cloud/support?init=ask">']}</li>
<li>{l s='Our team will take care of restoring your database safely.'}</li>
<li>{l s='Why can\'t I restore it by myself?'}</li>
<li>{l s='Your shop is hosted by PrestaShop. Although you can create backup files here below, there are core settings you cannot access for security reasons, like the database management. Thus, only our team can proceed to a restoration.'}</li>
</ol>
{l s='If you need to restore a database backup, we invite you to subscribe to a [1][2]technical support plan[/2][/1].' tags=['<strong>', '<a class="_blank" href="http://addons.prestashop.com/support/16298-support-essentiel-plan.html">']}
<br />
{l s='Our team will take care of restoring your database safely.'}
<br />
<br />
{l s='Why can\'t I restore it by myself?'}
<br />
{l s='Your shop is hosted by PrestaShop. Although you can create backup files here below, there are core settings you cannot access for security reasons, like the database management. Thus, only our team can proceed to a restoration.'}
</div>
{else}
<div class="alert alert-info">
......
......@@ -366,7 +366,7 @@ class AddressCore extends ObjectModel
$address = new Address();
$address->id_country = (int)$context->customer->geoloc_id_country;
$address->id_state = (int)$context->customer->id_state;
$address->zipcode = $context->customer->postcode;
$address->postcode = $context->customer->postcode;
}
else
{
......
......@@ -336,7 +336,7 @@ class ReferrerCore extends ObjectModel
$json_array = array(
'id_product' => (int)$product->id,
'product_name' => addslashes($product->name),
'product_name' => htmlspecialchars($product->name),
'uniqs' => (int)$stats_visits['uniqs'],
'visitors' => (int)$stats_visits['visitors'],
'visits' => (int)$stats_visits['visits'],
......@@ -354,4 +354,4 @@ class ReferrerCore extends ObjectModel
die ('['.Tools::jsonEncode($json_array).']');
}
}
\ No newline at end of file
}
......@@ -1859,6 +1859,9 @@ class ToolsCore
public static function getBrightness($hex)
{
if (Tools::strtolower($hex) == 'transparent')
return '129';
$hex = str_replace('#', '', $hex);
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
......
......@@ -620,6 +620,10 @@ class AdminControllerCore extends Controller
*/
public function processFilter()
{
Hook::exec('action'.$this->controller_name.'ListingFieldsModifier', array(
'fields' => &$this->fields_list,
));
if (!isset($this->list_id))
$this->list_id = $this->table;
......
......@@ -81,6 +81,9 @@ class AdminAttributeGeneratorControllerCore extends AdminController
public function initProcess()
{
if (!defined('PS_MASS_PRODUCT_CREATION'))
define('PS_MASS_PRODUCT_CREATION', true);
if (Tools::isSubmit('generate'))
{
if ($this->tabAccess['edit'] === '1')
......
......@@ -352,13 +352,42 @@ class AdminDashboardControllerCore extends AdminController
$articles_limit = 2;
foreach ($rss->channel->item as $item)
{
if ($articles_limit > 0 && Validate::isCleanHtml((string)$item->title) && Validate::isCleanHtml((string)$item->description))
if ($articles_limit > 0 && Validate::isCleanHtml((string)$item->title) && Validate::isCleanHtml((string)$item->description)
&& isset($item->link) && isset($item->title))
{
if (in_array($this->context->mode, array(Context::MODE_HOST, Context::MODE_HOST_CONTRIB)))
$utm_content = 'cloud';
else
$utm_content = 'download';
$shop_default_country_id = (int)Configuration::get('PS_COUNTRY_DEFAULT');
$shop_default_iso_country = (string)Tools::strtoupper(Country::getIsoById($shop_default_country_id));
$analytics_params = array('utm_source' => 'back-office',
'utm_medium' => 'rss',
'utm_campaign' => 'back-office-'.$shop_default_iso_country,
'utm_content' => $utm_content
);
$url_query = parse_url($item->link, PHP_URL_QUERY);
parse_str($url_query, $link_query_params);
if ($link_query_params)
{
$full_url_params = array_merge($link_query_params, $analytics_params);
$base_url = explode('?', (string)$item->link);
$base_url = (string)$base_url[0];
$article_link = $base_url.'?'.http_build_query($full_url_params);
}
else
$article_link = (string)$item->link.'?'.http_build_query($analytics_params);
$return['rss'][] = array(
'date' => Tools::displayDate(date('Y-m-d', strtotime((string)$item->pubDate))),
'title' => (string)Tools::htmlentitiesUTF8($item->title),
'short_desc' => Tools::truncateString(strip_tags((string)$item->description), 150),
'link' => (string)$item->link,
'link' => (string)$article_link,
);
}
else
break;
$articles_limit --;
......
......@@ -1263,6 +1263,9 @@ class AdminImportControllerCore extends AdminController
public function productImport()
{
if (!defined('PS_MASS_PRODUCT_CREATION'))
define('PS_MASS_PRODUCT_CREATION', true);
$this->receiveTab();
$handle = $this->openCsvFile();
$default_language_id = (int)Configuration::get('PS_LANG_DEFAULT');
......
......@@ -3812,7 +3812,7 @@ class AdminProductsControllerCore extends AdminController
if (is_array($images))
{
foreach ($images as $k => $image)
$images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], 'small_default');
$images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], ImageType::getFormatedName('small'));
$data->assign('images', $images);
}
$data->assign('imagesTypes', ImageType::getImagesTypes('products'));
......@@ -4077,7 +4077,7 @@ class AdminProductsControllerCore extends AdminController
if (isset($type['name']))
$data->assign('imageType', $type['name']);
else
$data->assign('imageType', 'small_default');
$data->assign('imageType', ImageType::getFormatedName('small'));
}
else
$this->displayWarning($this->l('You must save the product in this shop before adding images.'));
......@@ -4143,7 +4143,7 @@ class AdminProductsControllerCore extends AdminController
if (isset($type['name']))
$data->assign('imageType', $type['name']);
else
$data->assign('imageType', 'small_default');
$data->assign('imageType', ImageType::getFormatedName('small'));
$data->assign('imageWidth', (isset($image_type['width']) ? (int)($image_type['width']) : 64) + 25);
foreach ($images as $k => $image)
{
......
<?php
/*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* @since 1.5.0
......@@ -384,7 +384,6 @@ class AdminStockConfigurationControllerCore extends AdminController
$this->list_no_link = true;
$this->addRowAction('edit');
$this->addRowAction('delete');
$this->addRowActionSkipList('edit', array(1, 2, 3, 4, 5, 6, 7, 8));
$this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6, 7, 8));
$this->_where = ' AND a.deleted = 0';
......
......@@ -1280,6 +1280,9 @@ class AdminThemesControllerCore extends AdminController
if (count($to_install) > 0)
{
foreach ($to_install as $module)
$fields_value['modulesToExport_module'.$module] = true;
$fields_form['form']['input'][] = array(
'type' => 'checkbox',
'label' => $this->l('Select the theme\'s modules that you wish to export'),
......
......@@ -356,7 +356,7 @@ function bind_inputs()
});
}
else
$(this).closest('tr').find('td').find('div.input-group input:text').attr('disabled', 'disabled').val('');
$(this).closest('tr').find('td').find('div.input-group input:text').attr('disabled', 'disabled');
return false;
});
......
......@@ -197,7 +197,7 @@ function getBlogRss() {
success : function(jsonData) {
if (typeof jsonData !== 'undefined' && jsonData !== null && !jsonData.has_errors) {
for (var article in jsonData.rss) {
var article_html = '<article><h4><a href="'+jsonData.rss[article].link+'" class="_blank">'+jsonData.rss[article].title+'</a></h4><span class="dash-news-date text-muted">'+jsonData.rss[article].date+'</span><p>'+jsonData.rss[article].short_desc+' <a href="'+jsonData.rss[article].link+'">'+read_more+'</a><p></article><hr/>';
var article_html = '<article><h4><a href="'+jsonData.rss[article].link+'" class="_blank" onclick="return !window.open(this.href);">'+jsonData.rss[article].title+'</a></h4><span class="dash-news-date text-muted">'+jsonData.rss[article].date+'</span><p>'+jsonData.rss[article].short_desc+' <a href="'+jsonData.rss[article].link+'">'+read_more+'</a><p></article><hr/>';
$('.dash_news .dash_news_content').append(article_html);
}
}
......
......@@ -4,7 +4,7 @@
<currency name="Dollar (CAD)" iso_code="CAD" iso_code_num="124" sign="CAD$" blank="0" conversion_rate="1.40054" format="1" decimals="1" />
</currencies>
<languages>
<language iso_code="fr" />
<language iso_code="qc" />
<language iso_code="en" />
</languages>
<states>
......@@ -59,4 +59,3 @@
</configurations>
<group_default price_display_method="1" />
</localizationPack>
......@@ -4,7 +4,7 @@
<currency name="Franc" iso_code="CHF" iso_code_num="756" sign="CHF" blank="1" conversion_rate="1.34183" format="5" decimals="1" />
</currencies>
<languages>
<language iso_code="de" />
<language iso_code="dh" />
<language iso_code="fr" />
<language iso_code="it" />
</languages>
......@@ -12,15 +12,15 @@
<tax id="1" name="TVA CH 8.0%" rate="8.0" />
<tax id="2" name="TVA CH 3.8%" rate="3.8" />
<tax id="3" name="TVA CH 2.5%" rate="2.5" />
<taxRulesGroup name="CH Standard Rate (8.0%)">
<taxRule iso_code_country="ch" id_tax="1" />
</taxRulesGroup>
<taxRulesGroup name="CH Reduced Rate (3.8%)">
<taxRule iso_code_country="ch" id_tax="2" />
</taxRulesGroup>
<taxRulesGroup name="CH Super Reduced Rate (2.5%)">
<taxRule iso_code_country="ch" id_tax="3" />
</taxRulesGroup>
......@@ -32,4 +32,4 @@
<unit type="base_distance" value="m" />
<unit type="long_distance" value="km" />
</units>
</localizationPack>
\ No newline at end of file
</localizationPack>
Subproject commit 35f26774c058c5161949a682d3bdb6edfc055145
Subproject commit 7bae552aab6b279c9ae6d23ea0219d729d6bdf3d
Subproject commit c295016e6b994db6e44284547bb5be07b006956f
Subproject commit f086532625c0ce03dbdec54c38863d4cf2156802
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment