Skip to content

Commit 5ec66a8

Browse files
Merge pull request #37 from PrestaShop/dev
Release 2.0.4
2 parents 0535d26 + 133a9fb commit 5ec66a8

4 files changed

Lines changed: 9 additions & 30 deletions

File tree

.github/workflows/php.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2.0.0
11+
uses: actions/checkout@v5
1212

1313
- name: PHP syntax checker 5.6
1414
uses: prestashop/github-action-php-lint/5.6@master
@@ -39,13 +39,7 @@ jobs:
3939
php-version: '7.4'
4040

4141
- name: Checkout
42-
uses: actions/checkout@v2.0.0
43-
44-
- name: Cache dependencies
45-
uses: actions/cache@v2
46-
with:
47-
path: vendor
48-
key: php-${{ hashFiles('composer.lock') }}
42+
uses: actions/checkout@v5
4943

5044
- name: Install dependencies
5145
run: composer install
@@ -58,6 +52,7 @@ jobs:
5852
name: PHPStan
5953
runs-on: ubuntu-latest
6054
strategy:
55+
fail-fast: false
6156
matrix:
6257
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest']
6358
steps:
@@ -67,21 +62,7 @@ jobs:
6762
php-version: '7.4'
6863

6964
- name: Checkout
70-
uses: actions/checkout@v2.0.0
71-
72-
# Add vendor folder in cache to make next builds faster
73-
- name: Cache vendor folder
74-
uses: actions/cache@v1
75-
with:
76-
path: vendor
77-
key: php-${{ hashFiles('composer.lock') }}
78-
79-
# Add composer local folder in cache to make next builds faster
80-
- name: Cache composer folder
81-
uses: actions/cache@v1
82-
with:
83-
path: ~/.composer/cache
84-
key: php-composer-cache
65+
uses: actions/checkout@v5
8566

8667
- run: composer install
8768

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>statscheckup</name>
44
<displayName><![CDATA[Catalog evaluation]]></displayName>
5-
<version><![CDATA[2.0.3]]></version>
5+
<version><![CDATA[2.0.4]]></version>
66
<description><![CDATA[Adds a quick evaluation of your catalog quality to the Stats dashboard.]]></description>
77
<author><![CDATA[PrestaShop]]></author>
88
<tab><![CDATA[analytics_stats]]></tab>

statscheckup.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct()
3535
{
3636
$this->name = 'statscheckup';
3737
$this->tab = 'administration';
38-
$this->version = '2.0.3';
38+
$this->version = '2.0.4';
3939
$this->author = 'PrestaShop';
4040
$this->need_instance = 0;
4141

@@ -110,7 +110,6 @@ public function hookDisplayAdminStatsModules()
110110
1 => '<img src="../modules/' . $this->name . '/img/orange.png" alt="' . $this->trans('Average', [], 'Modules.Statscheckup.Admin') . '" />',
111111
2 => '<img src="../modules/' . $this->name . '/img/green.png" alt="' . $this->trans('Good', [], 'Modules.Statscheckup.Admin') . '" />',
112112
];
113-
$token_products = Tools::getAdminToken('AdminProducts' . (int) Tab::getIdFromClassName('AdminProducts') . (int) Context::getContext()->employee->id);
114113
$divisor = 4;
115114
$totals = ['products' => 0, 'active' => 0, 'images' => 0, 'sales' => 0, 'stock' => 0];
116115
foreach ($languages as $language) {
@@ -163,7 +162,7 @@ public function hookDisplayAdminStatsModules()
163162
<div class="panel-heading">'
164163
. $this->displayName . '
165164
</div>
166-
<form action="' . Tools::safeOutput(AdminController::$currentIndex . '&token=' . Tools::getValue('token') . '&module=' . $this->name) . '" method="post" class="checkup form-horizontal">
165+
<form action="' . Tools::safeOutput($this->context->link->getAdminLink('AdminStats', true, [], ['module' => $this->name])) . '" method="post" class="checkup form-horizontal">
167166
<table class="table checkup">
168167
<thead>
169168
<tr>
@@ -205,7 +204,7 @@ public function hookDisplayAdminStatsModules()
205204
<i class="icon-save"></i> ' . $this->trans('Save', [], 'Admin.Actions') . '
206205
</button>
207206
</form>
208-
<form action="' . Tools::safeOutput(AdminController::$currentIndex . '&token=' . Tools::getValue('token') . '&module=' . $this->name) . '" method="post" class="form-horizontal alert">
207+
<form action="' . Tools::safeOutput($this->context->link->getAdminLink('AdminStats', true, [], ['module' => $this->name])) . '" method="post" class="form-horizontal alert">
209208
<div class="row">
210209
<div class="col-lg-12">
211210
<label class="control-label pull-left">' . $this->trans('Order by', [], 'Modules.Statscheckup.Admin') . '</label>
@@ -270,7 +269,7 @@ public function hookDisplayAdminStatsModules()
270269
$this->html .= '
271270
<tr>
272271
<td>' . $row['id_product'] . '</td>
273-
<td><a href="' . Tools::safeOutput('index.php?controller=AdminProducts&updateproduct&id_product=' . $row['id_product'] . '&token=' . $token_products) . '">' . Tools::substr($row['name'], 0, 42) . '</a></td>
272+
<td><a href="' . Tools::safeOutput($this->context->link->getAdminLink('AdminProducts', true, [], ['updateproduct' => 1, 'id_product' => $row['id_product']])) . '">' . Tools::substr($row['name'], 0, 42) . '</a></td>
274273
<td class="center">' . $array_colors[$scores['active']] . '</td>';
275274
foreach ($languages as $language) {
276275
if (isset($row['desclength_' . $language['iso_code']])) {

upgrade/upgrade-2.0.2.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<?php
32
/**
43
* Copyright since 2007 PrestaShop SA and Contributors

0 commit comments

Comments
 (0)