Actually enforce the length limitation on the poll creator name

Show a nice error message if it's too long (not on the edit page because
there's no support for this right now)

mbstring is now a required extension

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-03-22 19:04:44 +01:00
parent a5c7df64b2
commit 36cef8cc39
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
6 changed files with 22 additions and 3 deletions

View file

@ -99,6 +99,13 @@ if (extension_loaded('intl')) {
$messages[] = new Message('danger', __('Check','You need to enable the PHP Intl extension.'));
}
// mbstring extension
if (extension_loaded('mbstring')) {
$messages[] = new Message('info', __('Check','PHP mbstring extension is enabled.'));
} else {
$messages[] = new Message('danger', __('Check','You need to enable the PHP mbstring extension.'));
}
// Is template compile dir exists and writable ?
if (!file_exists(ROOT_DIR . COMPILE_DIR)) {
$messages[] = new Message('danger', __f('Check','The template compile directory (%s) doesn\'t exist in "%s". Retry the installation process.', COMPILE_DIR, realpath(ROOT_DIR)));