diff options
author | ivan <ivan> | 2011-01-30 23:45:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-01-30 23:45:58 +0000 |
commit | 6e79acda564ac84f76ea67e21bdcb962f774c24b (patch) | |
tree | 7513847419e9118da0fb4e8cae07c17647cc1bed /torrus | |
parent | 38b2dffeb80f5e943a8f0237deee19ac24edaca9 (diff) |
fix torrus interface slowness resulting from initializing FS for every component, RT#10574
Diffstat (limited to 'torrus')
-rw-r--r-- | torrus/perllib/Torrus/Renderer/Freeside.pm | 8 | ||||
-rw-r--r-- | torrus/perllib/Torrus/ReportOutput/Freeside.pm | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/torrus/perllib/Torrus/Renderer/Freeside.pm b/torrus/perllib/Torrus/Renderer/Freeside.pm index 8d9341509..9a7c023be 100644 --- a/torrus/perllib/Torrus/Renderer/Freeside.pm +++ b/torrus/perllib/Torrus/Renderer/Freeside.pm @@ -6,10 +6,16 @@ use base 'Torrus::Freeside'; use FS::UID qw(cgisuidsetup); use FS::TicketSystem; +our $cgi = ''; + sub freesideSetup { #my $self = shift; - cgisuidsetup($Torrus::CGI::q); + return if $cgi eq $Torrus::CGI::q; + + $cgi = $Torrus::CGI::q; + + cgisuidsetup($cgi); FS::TicketSystem->init(); } diff --git a/torrus/perllib/Torrus/ReportOutput/Freeside.pm b/torrus/perllib/Torrus/ReportOutput/Freeside.pm index 47db28d56..f04ac6133 100644 --- a/torrus/perllib/Torrus/ReportOutput/Freeside.pm +++ b/torrus/perllib/Torrus/ReportOutput/Freeside.pm @@ -6,9 +6,13 @@ use base 'Torrus::Freeside'; use FS::UID qw(adminsuidsetup); use FS::TicketSystem; +our $issetup = 0; + sub freesideSetup { #my $self = shift; + return if $issetup++; + adminsuidsetup('fs_queue'); #XXX for now FS::TicketSystem->init(); |