Consistent check of allow_multibyte

It uses an injected instance everywhere else.
See https://github.com/silverstripe/silverstripe-cms/pull/2365#discussion_r247383809
This commit is contained in:
Ingo Schommer 2019-02-04 22:04:48 +13:00
parent c61ba88d82
commit 12274fb6ec

View File

@ -1939,7 +1939,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
$helpText = (self::config()->get('nested_urls') && $this->numChildren())
? $this->fieldLabel('LinkChangeNote')
: '';
if (!Config::inst()->get('SilverStripe\\View\\Parsers\\URLSegmentFilter', 'default_allow_multibyte')) {
if (!URLSegmentFilter::create()->getAllowMultibyte()) {
$helpText .= _t('SilverStripe\\CMS\\Forms\\SiteTreeURLSegmentField.HelpChars', ' Special characters are automatically converted or removed.');
}
$urlsegment->setHelpText($helpText);