Skip to content

Commit a9b4363

Browse files
authored
Refactor form actions to include module parameter
1 parent 63779d3 commit a9b4363

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

statscheckup.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function hookDisplayAdminStatsModules()
162162
<div class="panel-heading">'
163163
. $this->displayName . '
164164
</div>
165-
<form action="' . Tools::safeOutput($this->context->link->getAdminLink('AdminStats', true) . '&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">
166166
<table class="table checkup">
167167
<thead>
168168
<tr>
@@ -204,7 +204,7 @@ public function hookDisplayAdminStatsModules()
204204
<i class="icon-save"></i> ' . $this->trans('Save', [], 'Admin.Actions') . '
205205
</button>
206206
</form>
207-
<form action="' . Tools::safeOutput($this->context->link->getAdminLink('AdminStats', true) . '&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">
208208
<div class="row">
209209
<div class="col-lg-12">
210210
<label class="control-label pull-left">' . $this->trans('Order by', [], 'Modules.Statscheckup.Admin') . '</label>
@@ -269,7 +269,7 @@ public function hookDisplayAdminStatsModules()
269269
$this->html .= '
270270
<tr>
271271
<td>' . $row['id_product'] . '</td>
272-
<td><a href="' . Tools::safeOutput($this->context->link->getAdminLink('AdminProducts', true) . '&updateproduct&id_product=' . $row['id_product']) . '">' . 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>
273273
<td class="center">' . $array_colors[$scores['active']] . '</td>';
274274
foreach ($languages as $language) {
275275
if (isset($row['desclength_' . $language['iso_code']])) {

0 commit comments

Comments
 (0)