Skip to content

Small changes (spam filters & profile preferences) #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fixtures/preferences.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ App\Entity\Preference:
codeDescription: 'contact.allow.no.picture'
description: 'Allow to be contacted by members without a picture'
created: <DateTime()>
DefaultValue: Yes
DefaultValue: No
PossibleValues: No,Yes
ALLOW_REQUEST_NO_ABOUT_ME:
position: 64
codename: 'AllowContactWithoutAboutMe'
codeDescription: 'contact.allow.no.about_me'
description: 'Allow to be contacted by members without an about me section'
created: <DateTime()>
DefaultValue: Yes
DefaultValue: No
PossibleValues: No,Yes
2 changes: 1 addition & 1 deletion src/Controller/RelationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private function checkForEmailAddress(Relation $relation): bool
private function checkForPhoneNumber(Relation $relation): bool
{
$relationText = $relation->getCommentText();
$found = preg_match("/([0-9][\. \)-]*){8,}/", $relationText);
$found = preg_match("/([0-9][\. \)-]*){9,}/", $relationText);

return $found > 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/CommentModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function checkForEmailAddress(Comment $comment): bool
public function checkForPhoneNumber(Comment $comment): bool
{
$commentText = $comment->getTextfree();
$found = preg_match("/([0-9][\. \)-]*){8,}/", $commentText);
$found = preg_match("/([0-9][\. \)-]*){9,}/", $commentText);

return $found > 0;
}
Expand Down