restrict custom urls

fixed coding standard issues

added error message to locale

Remove unecessary variable

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas De Backer 2018-05-17 16:22:41 +02:00 committed by Thomas Citharel
parent 823c41d2e4
commit 5951519ad8
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,9 @@ if ($goToStep2) {
} else if ($pollRepository->existsById($customized_url)) {
$error_on_customized_url = true;
$error_on_customized_url_msg = __('Error', 'Poll id already used');
} else if (in_array($customized_url, ['admin', 'vote', 'action'], true)) {
$error_on_customized_url = true;
$error_on_customized_url_msg = __('Error', 'This id is not allowed');
}
}

View File

@ -154,6 +154,7 @@
"The name is invalid.": "The name is invalid.",
"The name you've chosen already exist in this poll!": "The name you've chosen already exists in this poll!",
"There is a problem with your choices": "There is a problem with your choices",
"This id is not allowed": "This id is not allowed",
"This poll doesn't exist !": "This poll doesn't exist!",
"Update vote failed": "Update vote failed",
"You already voted": "You already voted",