ConfigForm: enforce utf8 encoding
This commit is contained in:
parent
0b36b39cf7
commit
f66b5fe289
|
@ -79,6 +79,15 @@ class ConfigForm extends QuickForm
|
|||
}
|
||||
|
||||
if ($resourceName) {
|
||||
$resourceConfig = ResourceFactory::getResourceConfig($resourceName);
|
||||
if (! isset($resourceConfig->charset)
|
||||
|| $resourceConfig->charset !== 'utf8'
|
||||
) {
|
||||
$this->getElement('resource')
|
||||
->addError('Please change the encodig for the director database to utf8')
|
||||
->removeDecorator('description');
|
||||
}
|
||||
|
||||
$resource = ResourceFactory::create($resourceName);
|
||||
$db = $resource->getDbAdapter();
|
||||
|
||||
|
|
Loading…
Reference in New Issue