@@ -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 ' ]])) {
0 commit comments