From 35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 4 Aug 2005 18:51:22 +0000 Subject: Bug 126266: Use UTF-8 (Unicode) charset encoding for pages and email for NEW installations - Patch by byron jones (glob) r=wurblzap a=justdave --- checksetup.pl | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index f3a332870..311f8e3f5 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -317,7 +317,15 @@ my $modules = [ }, { name => 'Mail::Mailer', - version => '1.65' + version => '1.67' + }, + { + name => 'MIME::Base64', + version => $^O =~ /MSWin32/i ? '3.01' : '3.03' + }, + { + name => 'MIME::Tools', + version => '5.417' }, { name => 'Storable', @@ -339,6 +347,7 @@ my %ppm_modules = ( 'GD::Graph' => 'GDGraph', 'GD::Text::Align' => 'GDTextUtil', 'Mail::Mailer' => 'MailTools', + 'MIME::Tools' => 'MIME-Tools', ); sub install_command { @@ -1142,6 +1151,10 @@ END # Just to be sure ... unlink "$datadir/versioncache"; +# Check for a new install + +my $newinstall = !-e "$datadir/params"; + # Remove parameters from the params file that no longer exist in Bugzilla, # and set the defaults for new ones @@ -1185,6 +1198,11 @@ if ($^O =~ /MSWin32/i && Param('mail_delivery_method') eq 'sendmail') { SetParam('smtpserver', $smtp); } +# Enable UTF-8 on new installs +if ($newinstall) { + SetParam('utf8', 1); +} + # WriteParams will only write out still-valid entries WriteParams(); @@ -4211,6 +4229,9 @@ if ($sth->rows == 0) { if ($admin_create) { + require Bugzilla::Util; + import Bugzilla::Util 'is_7bit_clean'; + while( $realname eq "" ) { print "Enter the real name of the administrator: "; $realname = $answer{'ADMIN_REALNAME'} @@ -4220,6 +4241,13 @@ if ($sth->rows == 0) { if(! $realname ) { print "\nReally. We need a full name.\n"; } + if(! is_7bit_clean($realname)) { + print "\nSorry, but at this stage the real name can only " . + "contain standard English\ncharacters. Once Bugzilla " . + "has been installed, you can use the 'Prefs' page\nto " . + "update the real name.\n"; + $realname = ''; + } } # trap a few interrupts so we can fix the echo if we get aborted. -- cgit v1.2.3-24-g4f1b