JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[4.2] Contact form banned emails and content #315

Closed joomlapl-bot closed 1 year ago

joomlapl-bot commented 1 year ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/39907 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/language/en-GB/com_contact.ini b/administrator/language/en-GB/com_contact.ini index fcef57be6ba5..4045256e1613 100644 --- a/administrator/language/en-GB/com_contact.ini +++ b/administrator/language/en-GB/com_contact.ini @@ -26,7 +26,7 @@ COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL="# Articles to List" COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL="User Articles" COM_CONTACT_FIELD_CAPTCHA_LABEL="Allow Captcha on Contact" COM_CONTACT_FIELD_CATEGORY_LABEL="Select a Category" -COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC="Separate multiple email addresses with a semicolon." +COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC="Separate multiple email addresses with a semicolon. Emails from a complete domain can be banned by using @example.com or a partial domain using ple.com." COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL="Banned Email Address" COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC="Separate multiple subjects with a semicolon." COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL="Banned Subject" diff --git a/components/com_contact/src/Rule/ContactEmailMessageRule.php b/components/com_contact/src/Rule/ContactEmailMessageRule.php index f935ead4c01d..956200d2bd10 100644 --- a/components/com_contact/src/Rule/ContactEmailMessageRule.php +++ b/components/com_contact/src/Rule/ContactEmailMessageRule.php @@ -47,6 +47,7 @@ public function test(\SimpleXMLElement $element, $value, $group = null, Registry if ($banned) { foreach (explode(';', $banned) as $item) { + $item = trim($item); if ($item != '' && StringHelper::stristr($value, $item) !== false) { return false; } diff --git a/components/com_contact/src/Rule/ContactEmailRule.php b/components/com_contact/src/Rule/ContactEmailRule.php index 2ed1e808289f..c79ce54046d0 100644 --- a/components/com_contact/src/Rule/ContactEmailRule.php +++ b/components/com_contact/src/Rule/ContactEmailRule.php @@ -51,6 +51,7 @@ public function test(\SimpleXMLElement $element, $value, $group = null, Registry if ($banned) { foreach (explode(';', $banned) as $item) { + $item = trim($item); if ($item != '' && StringHelper::stristr($value, $item) !== false) { return false; } diff --git a/components/com_contact/src/Rule/ContactEmailSubjectRule.php b/components/com_contact/src/Rule/ContactEmailSubjectRule.php index ff6dad3ee356..02be40b8c4d4 100644 --- a/components/com_contact/src/Rule/ContactEmailSubjectRule.php +++ b/components/com_contact/src/Rule/ContactEmailSubjectRule.php @@ -47,6 +47,7 @@ public function test(\SimpleXMLElement $element, $value, $group = null, Registry if ($banned) { foreach (explode(';', $banned) as $item) { + $item = trim($item); if ($item != '' && StringHelper::stristr($value, $item) !== false) { return false; } ```