diff options
author | lpsolit%gmail.com <> | 2005-08-04 20:51:22 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-08-04 20:51:22 +0200 |
commit | 35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d (patch) | |
tree | fa6c7f8dd0e3cabefd256606fd988d6b88906058 /checksetup.pl | |
parent | 1f3e3f23e9f52cc74b19fe184004b67441b10ee1 (diff) | |
download | bugzilla-35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d.tar.gz bugzilla-35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d.tar.xz |
Bug 126266: Use UTF-8 (Unicode) charset encoding for pages and email for NEW installations - Patch by byron jones (glob) <bugzilla@glob.com.au> r=wurblzap a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 30 |
1 files changed, 29 insertions, 1 deletions
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. |