Fix some more DB initialisation errors

hinted-selects
Vitaliy Filippov 2014-10-24 18:14:02 +04:00
parent 3d279cf2c4
commit 4fb34102b1
3 changed files with 6 additions and 2 deletions

View File

@ -256,7 +256,9 @@ sub create_admin {
print get_text('install_admin_get_email') . ' ';
$login = <STDIN>;
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 = <STDIN>;
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;

View File

@ -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

View File

@ -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;