diff options
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r-- | Bugzilla/Config/Common.pm | 14 | ||||
-rw-r--r-- | Bugzilla/Config/General.pm | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index fabf7c880..24b636099 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -83,14 +83,16 @@ sub check_email { sub check_utf8 { - my $utf8 = shift; + my ($utf8, $entry) = @_; - # You cannot turn off the UTF-8 parameter if you've already converted - # your tables to utf-8. - my $dbh = Bugzilla->dbh; - if ( $dbh->isa('Bugzilla::DB::Mysql') && $dbh->bz_db_is_utf8 && !$utf8 ) { - return "You cannot disable UTF-8 support, because your MySQL database" . " is encoded in UTF-8"; + # You cannot turn off the UTF-8 parameter. + if ( !$utf8 ) { + return "You cannot disable UTF-8 support."; } + elsif ($entry eq 'utf8mb4' && $utf8 ne 'utf8mb4') { + return "You cannot disable UTF8-MB4 support."; + } + return ""; } diff --git a/Bugzilla/Config/General.pm b/Bugzilla/Config/General.pm index 9d85aecaf..15688dfd3 100644 --- a/Bugzilla/Config/General.pm +++ b/Bugzilla/Config/General.pm @@ -33,8 +33,9 @@ use constant get_param_list => ( { name => 'utf8', - type => 'b', - default => '0', + type => 's', + choices => [ '1', 'utf8', 'utf8mb4' ], + default => 'utf8', checker => \&check_utf8 }, |