1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/www/rt3/files/patch-lib::RT::Handle.pm
Cheng-Lung Sung 60cbd05b04 - update 3.0.12
- add two patch files for SQLite

PR:		ports/73029
Submitted by:	clsung
Approved by:	maintainer (Autrijus Tang), co-mentor (vanilla)
2004-10-23 07:29:33 +00:00

20 lines
689 B
Perl

--- lib/RT/Handle.pm Tue Mar 9 07:54:00 2004
+++ lib/RT/Handle.pm Wed Sep 22 12:46:41 2004
@@ -78,12 +78,16 @@
=cut
+use File::Spec;
sub BuildDSN {
my $self = shift;
# Unless the database port is a positive integer, we really don't want to pass it.
$RT::DatabasePort = undef unless (defined $RT::DatabasePort && $RT::DatabasePort =~ /^(\d+)$/);
$RT::DatabaseHost = undef unless (defined $RT::DatabaseHost && $RT::DatabaseHost ne '');
+$RT::DatabaseName = File::Spec->catfile($RT::VarPath, $RT::DatabaseName)
+ if ($RT::DatabaseType eq 'SQLite') and
+ not File::Spec->file_name_is_absolute($RT::DatabaseName);
$self->SUPER::BuildDSN(Host => $RT::DatabaseHost,