Update Admin\Install page

Add check Encoding, Collation and Character Type for PostgreSQL.
This commit is contained in:
Visman 2021-12-11 17:59:11 +07:00
parent ef101cc85a
commit bb966ebd9e
3 changed files with 42 additions and 0 deletions

View file

@ -544,6 +544,30 @@ class Install extends Admin
$v->addError('Bad database charset');
}
// база PostgreSQL, кодировка базы
if (
isset($stat['server_encoding'])
&& 'UTF8' !== $stat['server_encoding']
) {
$v->addError('Bad database encoding');
}
// база PostgreSQL, порядок сопоставления/сортировки
if (
isset($stat['lc_collate'])
&& 'C' !== $stat['lc_collate']
) {
$v->addError('Bad database collate');
}
// база PostgreSQL, тип символов
if (
isset($stat['lc_ctype'])
&& 'C' !== $stat['lc_ctype']
) {
$v->addError('Bad database ctype');
}
return $dbhost;
}

View file

@ -219,6 +219,15 @@ msgstr "<b>File uploads appear to be disallowed on this server!</b> If you want
msgid "Bad database charset"
msgstr "The database must be created with the character encoding <b>utf8mb4</b> (compare <b>utf8mb4_unicode_ci</b>)."
msgid "Bad database encoding"
msgstr "The database must be created with the character encoding <b>UTF8</b>."
msgid "Bad database collate"
msgstr "The database must be created with Collation order <b>C</b> (LC_COLLATE)."
msgid "Bad database ctype"
msgstr "The database must be created with Character classification <b>C</b> (LC_CTYPE)."
msgid "Cookie setup"
msgstr "<b>Cookie setup</b>"

View file

@ -219,6 +219,15 @@ msgstr "<b>Загрузка файлов, кажется, выключена н
msgid "Bad database charset"
msgstr "База данных должна быть создана с указанием кодировки символов <b>utf8mb4</b> (сравнение <b>utf8mb4_unicode_ci</b>)."
msgid "Bad database encoding"
msgstr "База данных должна быть создана с указанием кодировки символов <b>UTF8</b>."
msgid "Bad database collate"
msgstr "База данных должна быть создана с порядком сопоставления <b>C</b> (LC_COLLATE)."
msgid "Bad database ctype"
msgstr "База данных должна быть создана с типом символов <b>C</b> (LC_CTYPE)."
msgid "Cookie setup"
msgstr "<b>Настройки cookie</b>"