Skip to content

Commit

Permalink
Merge pull request #947 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release version 3.14.1
  • Loading branch information
Hlavtox authored Nov 20, 2023
2 parents 18657b3 + fb449c4 commit 3c2b733
Show file tree
Hide file tree
Showing 9 changed files with 667 additions and 629 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_facetedsearch</name>
<displayName><![CDATA[Faceted search]]></displayName>
<version><![CDATA[3.14.0]]></version>
<version><![CDATA[3.14.1]]></version>
<description><![CDATA[Displays a block allowing multiple filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
1,266 changes: 646 additions & 620 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
},
"homepage": "https://github.com/PrestaShop/ps_facetedsearch#readme",
"devDependencies": {
"@babel/eslint-parser": "^7.22.15",
"@babel/eslint-parser": "^7.23.3",
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@babel/core": "^7.23.3",
"@babel/node": "^7.22.19",
"@babel/preset-env": "^7.23.2",
"@babel/preset-env": "^7.23.3",
"@babel/register": "^7.22.15",
"babel-loader": "^9.1.3",
"chai": "^4.3.10",
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^6.8.1",
"eslint": "^8.52.0",
"eslint": "^8.54.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prestashop": "^0.2.1",
"eslint-plugin-import": "^2.29.0",
Expand Down
9 changes: 8 additions & 1 deletion ps_facetedsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct()
{
$this->name = 'ps_facetedsearch';
$this->tab = 'front_office_features';
$this->version = '3.14.0';
$this->version = '3.14.1';
$this->author = 'PrestaShop';
$this->need_instance = 0;
$this->bootstrap = true;
Expand Down Expand Up @@ -964,6 +964,13 @@ private function getExistingFiltersOverview()
$tmp[] = (isset($supportedControllers[$c]) ? $supportedControllers[$c]['name'] : $c);
}
$filters_templates[$k]['controllers'] = implode(', ', $tmp);

// Format date for different core versions. Since 8.0, it has only two arguments.
if (version_compare(_PS_VERSION_, '8.0.0', '>=')) {
$filters_templates[$k]['date_add'] = Tools::displayDate($v['date_add'], true);
} else {
$filters_templates[$k]['date_add'] = Tools::displayDate($v['date_add'], null, true);
}
}

return $filters_templates;
Expand Down
1 change: 1 addition & 0 deletions tests/php/phpstan/phpstan-1.7.6.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ parameters:
- '~^Parameter #1 \$string of method PrestaShop\\Module\\FacetedSearch\\URLSerializer::unserialize\(\) expects string, array given\.$~'
- '~^Call to an undefined static method Search::findClosestWeightestWord\(\)\.$~'
- '~^Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.$~'
- '~^Parameter #2 \$id_lang of static method ToolsCore::displayDate\(\) expects int|null, true given\.$~'
1 change: 1 addition & 0 deletions tests/php/phpstan/phpstan-1.7.7.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ parameters:
- '~^Access to an undefined property Cookie::\$id_lang\.$~'
- '~^Parameter #1 \$string of method PrestaShop\\Module\\FacetedSearch\\URLSerializer::unserialize\(\) expects string, array given\.$~'
- '~^Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.$~'
- '~^Parameter #2 \$id_lang of static method ToolsCore::displayDate\(\) expects int|null, true given\.$~'
1 change: 1 addition & 0 deletions tests/php/phpstan/phpstan-1.7.8.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ parameters:
- '~^Parameter #\d+ \$\w+ of static method ProductCore::priceCalculation\(\) expects \w+, \w+ given\.$~'
- '~^Access to an undefined property Cookie::\$id_lang\.$~'
- '~^Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.$~'
- '~^Parameter #2 \$id_lang of static method ToolsCore::displayDate\(\) expects int|null, true given\.$~'
2 changes: 2 additions & 0 deletions tests/php/phpstan/phpstan-latest.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ parameters:
- '~^Parameter #2 \$active of static method CurrencyCore::getCurrencies\(\) expects bool, int given\.$~'
- '~^Parameter #3 \$groupBy of static method CurrencyCore::getCurrencies\(\) expects bool, Shop given\.$~'
- '~^Parameter #\d+ \$\w+ of static method ProductCore::priceCalculation\(\) expects \w+, \w+ given\.$~'
- '~^Parameter #2 \$full of static method ToolsCore::displayDate\(\) expects bool, null given\.$~'
- '~^Static method ToolsCore::displayDate\(\) invoked with 3 parameters, 1-2 required\.$~'
6 changes: 3 additions & 3 deletions views/templates/admin/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
<tbody>
{foreach $filters_templates as $template}
<tr>
<td class="center">{(int)$template['id_layered_filter']}</td>
<td class="center">{$template['id_layered_filter']}</td>
<td class="text-left">{$template['name']}</td>
<td>{$template['controllers']}</td>
<td class="center">{(int)$template['n_categories']}</td>
<td>{Tools::displayDate($template['date_add'],null , true)}</td>
<td class="center">{$template['n_categories']}</td>
<td>{$template['date_add']}</td>
<td>
{if empty($limit_warning)}
<div class="btn-group-action">
Expand Down

0 comments on commit 3c2b733

Please sign in to comment.