projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
should fix intermittant slowness, RT#18719
[freeside.git]
/
htetc
/
handler.pl
diff --git
a/htetc/handler.pl
b/htetc/handler.pl
index
2e6fbe5
..
d7c5657
100644
(file)
--- a/
htetc/handler.pl
+++ b/
htetc/handler.pl
@@
-7,6
+7,14
@@
use warnings;
use FS::Mason qw( mason_interps );
use FS::Trace;
use FS::Mason qw( mason_interps );
use FS::Trace;
+if ( %%%RT_ENABLED%%% ) {
+ require RT;
+ $> = scalar(getpwnam('freeside'));
+ RT::LoadConfig();
+ RT::Init();
+ $> = $<;
+}
+
#use vars qw($r);
# Bring in ApacheHandler, necessary for mod_perl integration.
#use vars qw($r);
# Bring in ApacheHandler, necessary for mod_perl integration.
@@
-151,19
+159,10
@@
sub handler
$status;
}
$status;
}
-my $rt_initialized = 0;
-
sub my_rt_init {
return unless $RT::VERSION;
sub my_rt_init {
return unless $RT::VERSION;
-
- if ( $rt_initialized ) {
- RT::ConnectToDatabase();
- RT::InitSignalHandlers();
- } else {
- RT::LoadConfig();
- RT::Init();
- $rt_initialized++;
- }
+ RT::ConnectToDatabase();
+ RT::InitSignalHandlers();
}
1;
}
1;