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

(-)a/Koha/Database.pm (-2 / +5 lines)
Lines 53-61 sub _new_schema { Link Here
53
    my $db_port   = $context->config("port") || '';
53
    my $db_port   = $context->config("port") || '';
54
    my $db_user   = $context->config("user");
54
    my $db_user   = $context->config("user");
55
    my $db_passwd = $context->config("pass");
55
    my $db_passwd = $context->config("pass");
56
57
    my $db_opts = ($db_driver eq 'mysql') ? { mysql_enable_utf8 => 1 } :
58
                  ($db_driver eq 'Pg')    ? { pg_enable_utf8    => 1 } :
59
                                            { };
56
    my $schema    = Koha::Schema->connect(
60
    my $schema    = Koha::Schema->connect(
57
        "DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",
61
        "DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",
58
        $db_user, $db_passwd );
62
        $db_user, $db_passwd, $db_opts );
59
    return $schema;
63
    return $schema;
60
}
64
}
61
65
62
- 

Return to bug 11906