From accd734fd5a4ac2d242997c110c1924844219ba7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 9 Dec 2006 19:51:33 +0000 Subject: Bug 361252: checksetup.pl should get confirmation from the user before causing dataloss in UTF8 conversion - Patch by Max Kanat-Alexander r=LpSolit a=myk --- Bugzilla/DB/Mysql.pm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'Bugzilla/DB/Mysql.pm') diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 4335a1b2f..a8210a972 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -43,6 +43,7 @@ package Bugzilla::DB::Mysql; use strict; +use Bugzilla::Constants; use Bugzilla::Util; use Bugzilla::Error; @@ -349,7 +350,7 @@ sub bz_setup_database { . "If you would like to cancel, press Ctrl-C now..." . " (Waiting 45 seconds...)\n\n"; # Wait 45 seconds for them to respond. - sleep(45); + sleep(45) unless Bugzilla->installation_answers->{NO_PAUSE}; } print "Renaming indexes...\n"; @@ -566,9 +567,23 @@ WARNING: We are about to convert your table storage format to UTF8. This If you ever used a version of Bugzilla before 2.22, we STRONGLY recommend that you stop checksetup.pl NOW and run contrib/recode.pl. - Continuing in 60 seconds... EOT - sleep 60; + + if (!Bugzilla->installation_answers->{NO_PAUSE}) { + if (Bugzilla->installation_mode == + INSTALLATION_MODE_NON_INTERACTIVE) + { + print <