зеркало из https://github.com/mozilla/pjs.git
Use Apache2::RequestUtil->request() properly
This commit is contained in:
Родитель
9b21dfb5e3
Коммит
b406a3ba04
|
@ -100,7 +100,7 @@ sub request_cache {
|
||||||
if ($ENV{MOD_PERL}) {
|
if ($ENV{MOD_PERL}) {
|
||||||
my $request;
|
my $request;
|
||||||
if (MP2) {
|
if (MP2) {
|
||||||
$request = Apache2::RequestUtil::request();
|
$request = Apache2::RequestUtil->request();
|
||||||
} elsif (MP1) {
|
} elsif (MP1) {
|
||||||
$request = Apache->request();
|
$request = Apache->request();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ sub db_Main {
|
||||||
if (MP1) {
|
if (MP1) {
|
||||||
$request = Apache->request();
|
$request = Apache->request();
|
||||||
} elsif (MP2) {
|
} elsif (MP2) {
|
||||||
$request = Apache2::RequestUtil::request();
|
$request = Apache2::RequestUtil->request();
|
||||||
}
|
}
|
||||||
if ( $ENV{'MOD_PERL'} and defined $request ) {
|
if ( $ENV{'MOD_PERL'} and defined $request ) {
|
||||||
$dbh = $request->pnotes('dbh');
|
$dbh = $request->pnotes('dbh');
|
||||||
|
|
|
@ -50,7 +50,7 @@ sub memoize {
|
||||||
my $fn = shift;
|
my $fn = shift;
|
||||||
my %options = @_;
|
my %options = @_;
|
||||||
|
|
||||||
if (MP2 && ! Apache2::RequestUtil::request()) {
|
if (MP2 && ! Apache2::RequestUtil->request()) {
|
||||||
return;
|
return;
|
||||||
} if (MP1 && ! Apache->request()) {
|
} if (MP1 && ! Apache->request()) {
|
||||||
return;
|
return;
|
||||||
|
@ -75,7 +75,7 @@ sub memoize {
|
||||||
if (MP1) {
|
if (MP1) {
|
||||||
$cache = Apache->request()->pnotes();
|
$cache = Apache->request()->pnotes();
|
||||||
} elsif (MP2) {
|
} elsif (MP2) {
|
||||||
$cache = Apache2::RequestUtil::request()->pnotes();
|
$cache = Apache2::RequestUtil->request()->pnotes();
|
||||||
}
|
}
|
||||||
$cache->{'S'.$fn} = {};
|
$cache->{'S'.$fn} = {};
|
||||||
$cache->{'L'.$fn} = {};
|
$cache->{'L'.$fn} = {};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче