[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 9dece56cdfab480d12adbbb8f627014079dc24f1
Ivan
ivan at 420.am
Mon Aug 13 13:00:42 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 9dece56cdfab480d12adbbb8f627014079dc24f1 (commit)
from 0ebd6c5917a0e40cb498bb4582d858af118dd42a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9dece56cdfab480d12adbbb8f627014079dc24f1
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Aug 13 13:00:42 2012 -0700
should fix intermittant slowness, RT#18719
diff --git a/Makefile b/Makefile
index 864d9c2..903c0eb 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,7 @@ install-docs: check-conflicts docs
cp htetc/handler.pl ${MASON_HANDLER}
perl -p -i -e "\
s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
+ s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
" ${MASON_HANDLER} || true
mkdir -p ${FREESIDE_EXPORT}/profile
chown freeside ${FREESIDE_EXPORT}/profile
diff --git a/htetc/handler.pl b/htetc/handler.pl
index 2e6fbe5..d7c5657 100644
--- a/htetc/handler.pl
+++ b/htetc/handler.pl
@@ -7,6 +7,14 @@ use warnings;
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.
@@ -151,19 +159,10 @@ sub handler
$status;
}
-my $rt_initialized = 0;
-
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;
-----------------------------------------------------------------------
Summary of changes:
Makefile | 1 +
htetc/handler.pl | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 11 deletions(-)
More information about the freeside-commits
mailing list