From 4fb34102b14f829e01ed4e64dc36b31f9d6628c7 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 24 Oct 2014 18:14:02 +0400 Subject: [PATCH] Fix some more DB initialisation errors --- Bugzilla/Install.pm | 6 +++++- Bugzilla/Product.pm | 1 - Bugzilla/Views.pm | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Install.pm b/Bugzilla/Install.pm index 362f5c464..1b09e14c8 100644 --- a/Bugzilla/Install.pm +++ b/Bugzilla/Install.pm @@ -256,7 +256,9 @@ sub create_admin { print get_text('install_admin_get_email') . ' '; $login = ; chomp $login; + $Bugzilla::Error::IN_EVAL++; eval { Bugzilla::User->check_login_name_for_creation($login); }; + $Bugzilla::Error::IN_EVAL--; if ($@) { print $@ . "\n"; @@ -339,7 +341,9 @@ sub _prompt_for_password { print "\n", get_text('install_confirm_password'), ' '; my $pass2 = ; chomp $pass2; - eval { validate_password($password, $pass2); }; + $Bugzilla::Error::IN_EVAL++; + eval { Bugzilla::User::validate_password($password, $pass2); }; + $Bugzilla::Error::IN_EVAL--; if ($@) { print "\n$@\n"; undef $password; diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index f64b02438..1c84d048c 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -67,7 +67,6 @@ use constant DB_COLUMNS => qw( use constant REQUIRED_CREATE_FIELDS => qw( name description - version ); # Allow to update every valid DB column diff --git a/Bugzilla/Views.pm b/Bugzilla/Views.pm index 0b8678343..b0b5d1e8b 100644 --- a/Bugzilla/Views.pm +++ b/Bugzilla/Views.pm @@ -58,6 +58,7 @@ sub refresh_some_views $u{$_} = 1; } my $dbh = Bugzilla->dbh; + return unless $dbh->can('real_table_list'); my $r = $dbh->real_table_list('view$%$bugs', 'VIEW'); # Save current user my $old_user = Bugzilla->user;