Added generateContent script, added passive profiling
This commit is contained in:
parent
50cc94ba43
commit
90a5dd13d2
1 changed files with 5 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ use WebGUI::SQL;
|
||||||
use WebGUI::Style;
|
use WebGUI::Style;
|
||||||
use WebGUI::Page;
|
use WebGUI::Page;
|
||||||
use WebGUI::URL;
|
use WebGUI::URL;
|
||||||
|
use WebGUI::PassiveProfiling;
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -138,7 +139,8 @@ sub _processOperations {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub page {
|
sub page {
|
||||||
WebGUI::Session::open($_[0],$_[1]);
|
my $useExistingSession = $_[2];
|
||||||
|
WebGUI::Session::open($_[0],$_[1]) unless ($useExistingSession);
|
||||||
my $useCache = ($session{form}{op} eq "" && $session{form}{wid} eq "" && $session{form}{makePrintable} eq ""
|
my $useCache = ($session{form}{op} eq "" && $session{form}{wid} eq "" && $session{form}{makePrintable} eq ""
|
||||||
&& (($session{page}{cacheTimeout} > 10 && $session{user}{userId} !=1) || ($session{page}{cacheTimeoutVisitor} > 10 && $session{user}{userId} == 1))
|
&& (($session{page}{cacheTimeout} > 10 && $session{user}{userId} !=1) || ($session{page}{cacheTimeoutVisitor} > 10 && $session{user}{userId} == 1))
|
||||||
&& not $session{var}{adminOn});
|
&& not $session{var}{adminOn});
|
||||||
|
|
@ -157,6 +159,7 @@ sub page {
|
||||||
}
|
}
|
||||||
if ($output ne "") {
|
if ($output ne "") {
|
||||||
# using cache
|
# using cache
|
||||||
|
WebGUI::PassiveProfiling::addPage(); # add wobjects on page to passive profile log
|
||||||
} elsif (WebGUI::HTTP::getMimeType() ne "text/html") {
|
} elsif (WebGUI::HTTP::getMimeType() ne "text/html") {
|
||||||
$output = $operationOutput.$wobjectOutput;
|
$output = $operationOutput.$wobjectOutput;
|
||||||
} elsif ($operationOutput ne "") {
|
} elsif ($operationOutput ne "") {
|
||||||
|
|
@ -174,7 +177,7 @@ sub page {
|
||||||
$cache->set($output, $ttl) if ($useCache);
|
$cache->set($output, $ttl) if ($useCache);
|
||||||
}
|
}
|
||||||
my $httpHeader = WebGUI::HTTP::getHeader();
|
my $httpHeader = WebGUI::HTTP::getHeader();
|
||||||
WebGUI::Session::close();
|
WebGUI::Session::close() unless ($useExistingSession);
|
||||||
return $httpHeader.$output;
|
return $httpHeader.$output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue