Skip to content

Commit

Permalink
Merge pull request #229 from Hlavtox/modernize
Browse files Browse the repository at this point in the history
Remove unneeded version check
  • Loading branch information
Hlavtox authored Dec 30, 2023
2 parents b7b6f93 + c202521 commit 964f693
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion controllers/front/gdpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function initContent()
'psgdpr_front_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'gdpr', $params, true),
'psgdpr_csv_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'ExportCustomerData', array_merge(['type' => 'csv'], $params), true),
'psgdpr_pdf_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'ExportCustomerData', array_merge(['type' => 'pdf'], $params), true),
'psgdpr_ps_version' => (bool) version_compare(_PS_VERSION_, '1.7', '>='),
'psgdpr_id_customer' => Context::getContext()->customer->id,
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function searchCustomers(Request $request): Response
$requestBodyContent = json_decode($request->getContent(), true);
$phrase = $requestBodyContent['phrase'];

if (!isset($phrase) && empty($phrase)) {
if (empty($phrase)) {
return $this->json(['message' => 'Property phrase is missing or empty.'], Response::HTTP_BAD_REQUEST);
}

Expand Down
1 change: 0 additions & 1 deletion views/templates/front/account_gdpr_page.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<script type="text/javascript">
var psgdpr_front_controller = "{/literal}{$psgdpr_front_controller|escape:'htmlall':'UTF-8'}{literal}";
var psgdpr_id_customer = "{/literal}{$psgdpr_front_controller|escape:'htmlall':'UTF-8'}{literal}";
var psgdpr_ps_version = "{/literal}{$psgdpr_ps_version|escape:'htmlall':'UTF-8'}{literal}";
</script>
{/literal}
{/block}

0 comments on commit 964f693

Please sign in to comment.