Skip to content

Commit

Permalink
Merge pull request #82 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 4.4.3
  • Loading branch information
Hlavtox authored Nov 28, 2024
2 parents 98886a8 + 3e2f36f commit 95346c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 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>contactform</name>
<displayName><![CDATA[Contact form]]></displayName>
<version><![CDATA[4.4.2]]></version>
<version><![CDATA[4.4.3]]></version>
<description><![CDATA[Adds a contact form to the "Contact us" page.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
16 changes: 3 additions & 13 deletions contactform.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct()
$this->name = 'contactform';
$this->author = 'PrestaShop';
$this->tab = 'front_office_features';
$this->version = '4.4.2';
$this->version = '4.4.3';
$this->bootstrap = true;

parent::__construct();
Expand Down Expand Up @@ -406,26 +406,20 @@ public function sendMessage()
[],
'Shop.Notifications.Error'
);

return;
}
if (empty($message)) {
$this->context->controller->errors[] = $this->trans(
'The message cannot be blank.',
[],
'Shop.Notifications.Error'
);

return;
}
if (!Validate::isCleanHtml($message)) {
$this->context->controller->errors[] = $this->trans(
'Invalid message',
[],
'Shop.Notifications.Error'
);

return;
}

$id_contact = (int) Tools::getValue('id_contact');
Expand All @@ -437,8 +431,6 @@ public function sendMessage()
[],
'Modules.Contactform.Shop'
);

return;
}

if (!empty($file_attachment['name']) && $file_attachment['error'] != 0) {
Expand All @@ -447,8 +439,6 @@ public function sendMessage()
[],
'Modules.Contactform.Shop'
);

return;
}
if (!empty($file_attachment['name']) &&
!in_array(Tools::strtolower(Tools::substr($file_attachment['name'], -4)), $extension) &&
Expand All @@ -459,8 +449,6 @@ public function sendMessage()
[],
'Modules.Contactform.Shop'
);

return;
}
if ($url !== ''
|| empty($serverToken)
Expand All @@ -473,7 +461,9 @@ public function sendMessage()
'Modules.Contactform.Shop'
);
$this->createNewToken();
}

if (!empty($this->context->controller->errors)) {
return;
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 95346c1

Please sign in to comment.