View | Details | Raw Unified | Return to bug 25026
Collapse All | Expand All

(-)a/Koha/Database.pm (-5 / +7 lines)
Lines 110-126 sub _new_schema { Link Here
110
110
111
    my $dbh = $schema->storage->dbh;
111
    my $dbh = $schema->storage->dbh;
112
    eval {
112
    eval {
113
        my $HandleError = $dbh->{HandleError};
113
        if ( $ENV{KOHA_DB_DO_NOT_RAISE_OR_PRINT_ERROR} ) {
114
        if ( $ENV{KOHA_DB_DO_NOT_RAISE_OR_PRINT_ERROR} ) {
114
            $dbh->{RaiseError} = 0;
115
            $dbh->{HandleError} = sub { return 1 };
115
            $dbh->{PrintError} = 0;
116
        }
116
        }
117
        $dbh->do(q|
117
        $dbh->do(q|
118
            SELECT * FROM systempreferences WHERE 1 = 0 |
118
            SELECT * FROM systempreferences WHERE 1 = 0 |
119
        );
119
        );
120
        $dbh->{RaiseError} = 1;
120
        $dbh->{HandleError} = $HandleError;
121
        $dbh->{PrintError} = 1;
122
    };
121
    };
123
    $dbh->{RaiseError} = 0 if $@;
122
123
    if ( $@ ) {
124
        $dbh->{HandleError} = sub { warn $_[0]; return 1 };
125
    }
124
126
125
    return $schema;
127
    return $schema;
126
}
128
}
(-)a/installer/install.pl (-3 / +3 lines)
Lines 220-228 elsif ( $step && $step == 3 ) { Link Here
220
220
221
    my $op = $query->param('op');
221
    my $op = $query->param('op');
222
    if ( $op && $op eq 'finished' ) {
222
    if ( $op && $op eq 'finished' ) {
223
        #
223
        # Remove the HandleError set at the beginning of the installer process
224
        C4::Context->dbh->disconnect;
225
224
        # we have finished, just redirect to mainpage.
226
        # we have finished, just redirect to mainpage.
225
        #
226
        print $query->redirect("/cgi-bin/koha/mainpage.pl");
227
        print $query->redirect("/cgi-bin/koha/mainpage.pl");
227
        exit;
228
        exit;
228
    }
229
    }
229
- 

Return to bug 25026