summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-08-04 18:24:15 +0200
committerDylan William Hardison <dylan@hardison.net>2018-08-04 18:24:15 +0200
commitf44392e8cdbea85ac308b2472f813ee605ebae4b (patch)
tree6e7adaf99a0e5a43eb1bf5a0d673d86b60f34f99 /Bugzilla/Config
parent5be3a7fd0061aa0bc3059e09079741873b9b833f (diff)
parent4528b21bc922f8b1e0ba8581d230a492aa43c9cf (diff)
downloadbugzilla-f44392e8cdbea85ac308b2472f813ee605ebae4b.tar.gz
bugzilla-f44392e8cdbea85ac308b2472f813ee605ebae4b.tar.xz
Merge branch 'mojo-poc'
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r--Bugzilla/Config/Common.pm14
-rw-r--r--Bugzilla/Config/General.pm11
2 files changed, 11 insertions, 14 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 7e1c812c1..fa7cf2d08 100644
--- a/Bugzilla/Config/General.pm
+++ b/Bugzilla/Config/General.pm
@@ -41,18 +41,13 @@ use constant get_param_list => (
{
name => 'utf8',
- type => 'b',
- default => '0',
+ type => 's',
+ choices => [ '1', 'utf8', 'utf8mb4' ],
+ default => 'utf8',
checker => \&check_utf8
},
{
- name => 'shutdownhtml',
- type => 'l',
- default => ''
- },
-
- {
name => 'announcehtml',
type => 'l',
default => ''