[Rt-commit] r17874 - in rt/3.8/trunk: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Jan 21 17:21:22 EST 2009
Author: falcone
Date: Wed Jan 21 17:21:21 2009
New Revision: 17874
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Config.pm
Log:
r43776 at ketch: falcone | 2009-01-21 17:19:43 -0500
* RT::Test sets ENV{RT_SITE_CONFIG} to a tempfile that doesn't
look like SiteConfig.pm so we need to force _LoadConfig to
treat it as a SiteConfig, otherwise it won't let you override
DatabaseName or MailCommand and running tests will drop your
real database.
Modified: rt/3.8/trunk/lib/RT/Config.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Config.pm (original)
+++ rt/3.8/trunk/lib/RT/Config.pm Wed Jan 21 17:21:21 2009
@@ -434,7 +434,7 @@
if ( $args{'File'} eq 'RT_SiteConfig.pm'
and my $site_config = $ENV{RT_SITE_CONFIG} )
{
- $self->_LoadConfig( %args, File => $site_config );
+ $self->_LoadConfig( %args, File => $site_config, SiteConfig => 1 );
} else {
$self->_LoadConfig(%args);
}
@@ -448,7 +448,8 @@
my %args = ( File => '', @_ );
my $is_ext = $args{'File'} =~ /^(?!RT_)(?:(.*)_)(?:Site)?Config/ ? $1 : '';
- my $is_site = $args{'File'} =~ /SiteConfig/ ? 1 : 0;
+ my $is_site = $args{SiteConfig} ? 1 :
+ $args{'File'} =~ /SiteConfig/ ? 1 : 0;
eval {
package RT;
More information about the Rt-commit
mailing list