[Rt-commit] rt branch, master, updated. rt-3.9.7-1165-g9fd4796
? sunnavy
sunnavy at bestpractical.com
Wed Jan 5 21:13:18 EST 2011
The branch, master has been updated
via 9fd4796113958251fbcfa7b4f1795e32353c0fb6 (commit)
from f52c95effe45fd4138b60f90b293703b81fefaf3 (commit)
Summary of changes:
lib/RT/Config.pm | 4 ++++
lib/RT/Test.pm | 11 -----------
share/html/Install/DatabaseDetails.html | 1 -
share/html/Install/Global.html | 1 -
4 files changed, 4 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit 9fd4796113958251fbcfa7b4f1795e32353c0fb6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jan 6 10:01:09 2011 +0800
allow load RT_SiteConfig.pm again and again by default
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 64798a2..e055d45 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -615,9 +615,13 @@ sub LoadConfig {
and my $site_config = $ENV{RT_SITE_CONFIG} )
{
$self->_LoadConfig( %args, File => $site_config );
+ # to allow load siteconfig again and again in case it's updated
+ delete $INC{ $site_config };
} else {
$self->_LoadConfig(%args);
+ delete $INC{$args{'File'}};
}
+
$args{'File'} =~ s/Site(?=Config\.pm$)//;
$self->_LoadConfig(%args);
return 1;
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 9f15002..9ecbd29 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -135,17 +135,6 @@ sub import {
$class->bootstrap_config( %args );
use RT;
- my $old_load_config = \&RT::LoadConfig;
- {
- no warnings 'redefine';
- *RT::LoadConfig = sub {
- $old_load_config->(@_);
-
- # in case we want to load RT_SiteConfig again
- # this is an equivalent in tests to "delete $INC{'RT_SiteConfig.pm'}" in code
- delete $INC{ $tmp{'config'}{'RT'} };
- };
- }
RT::LoadConfig;
diff --git a/share/html/Install/DatabaseDetails.html b/share/html/Install/DatabaseDetails.html
index 8441d19..ebf46f4 100644
--- a/share/html/Install/DatabaseDetails.html
+++ b/share/html/Install/DatabaseDetails.html
@@ -129,7 +129,6 @@ if ( $Run ) {
my ( $status, $msg ) = RT::Installer->SaveConfig;
if ( $status ) {
- delete $INC{'RT_SiteConfig.pm'};
RT->LoadConfig;
RT::Handle->FinalizeDatabaseType();
# dba connect systemdsn
diff --git a/share/html/Install/Global.html b/share/html/Install/Global.html
index a832833..46633d2 100644
--- a/share/html/Install/Global.html
+++ b/share/html/Install/Global.html
@@ -94,7 +94,6 @@ if ( $Run ) {
my ( $status, $msg ) = RT::Installer->SaveConfig;
if ( $status ) {
- delete $INC{'RT_SiteConfig.pm'};
RT->LoadConfig;
if ( $RT::Installer->{DatabaseAction} ne 'none' ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list