Allow to choose mbstring as recoding engine

This commit is contained in:
Michal Čihař 2013-07-30 13:59:26 +02:00
parent a749577ad5
commit e0fce588d2
2 changed files with 8 additions and 1 deletions

View File

@ -32,7 +32,7 @@ $cfg_db['Servers'] = array(
'only_db' => 'array'
)
);
$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'none');
$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'mb', 'none');
$cfg_db['OBGzip'] = array('auto', true, false);
$cfg_db['MemoryLimit'] = 'short_string';
$cfg_db['NavigationLogoLinkWindow'] = array('main', 'new');

View File

@ -766,6 +766,13 @@ class FormDisplay
'recode', 'recode'
);
}
if (!function_exists('mb_convert_encoding')) {
$opts['values']['mb'] .= ' (' . __('unavailable') . ')';
$comment .= ($comment ? ", " : '') . sprintf(
__('"%s" requires %s extension'),
'mb', 'mbstring'
);
}
$opts['comment'] = $comment;
$opts['comment_warning'] = true;
}