about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-02 07:56:36 +0000
committerEric Wong <e@80x24.org>2016-07-02 07:57:28 +0000
commit4d02ed7d60ecff963d3026187a0357e359fd2981 (patch)
treecbb0a75b7c5675da99ee3820577cdecd8a8ffe98 /lib/PublicInbox
parent2d5348c139e9a04d0576fffb0bd5d6c7750fa765 (diff)
downloadpublic-inbox-4d02ed7d60ecff963d3026187a0357e359fd2981.tar.gz
More work on on the Plack::Request/CGI.pm removal front,
No need to access the PSGI env through an extra hash lookup.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/SearchView.pm2
-rw-r--r--lib/PublicInbox/WWW.pm9
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index ce1eff1e..15bb8232 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -86,7 +86,7 @@ sub mset_summary {
 sub err_txt {
         my ($ctx, $err) = @_;
         my $u = '//xapian.org/docs/queryparser.html';
-        $u = PublicInbox::Hval::prurl($ctx->{cgi}->{env}, $u);
+        $u = PublicInbox::Hval::prurl($ctx->{env}, $u);
         $err =~ s/^\s*Exception:\s*//; # bad word to show users :P
         $err = ascii_html($err);
         "\nBad query: <b>$err</b>\n" .
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 1e23c439..940e1c51 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -152,7 +152,7 @@ sub invalid_inbox {
                 $ctx->{git_dir} = $obj->{mainrepo};
                 $ctx->{git} = $obj->git;
                 # for PublicInbox::HTTP::weaken_task:
-                $ctx->{cgi}->{env}->{'pi-httpd.inbox'} = $obj;
+                $ctx->{env}->{'pi-httpd.inbox'} = $obj;
                 $ctx->{-inbox} = $obj;
                 $ctx->{inbox} = $inbox;
                 return;
@@ -162,7 +162,7 @@ sub invalid_inbox {
         # generation and link things intended for nntp:// to https?://,
         # so try to infer links and redirect them to the appropriate
         # list URL.
-        $self->news_www->call($ctx->{cgi}->{env});
+        $self->news_www->call($ctx->{env});
 }
 
 # returns undef if valid, array ref response if invalid
@@ -284,7 +284,7 @@ sub footer {
         $ctx->{footer} = join("\n",
                 '- ' . $desc,
                 "A <a\nhref=\"" .
-                        PublicInbox::Hval::prurl($ctx->{cgi}->{env}, PI_URL) .
+                        PublicInbox::Hval::prurl($ctx->{env}, PI_URL) .
                         '">public-inbox</a>, ' .
                         'anybody may post in plain-text (not HTML):',
                 $addr,
@@ -388,13 +388,12 @@ sub legacy_redirects {
         } elsif ($path_info =~ m!$INBOX_RE/(\S+/\S+)/f\z!o) {
                 r301($ctx, $1, $2);
         } else {
-                $self->news_www->call($ctx->{cgi}->{env});
+                $self->news_www->call($ctx->{env});
         }
 }
 
 sub r301 {
         my ($ctx, $inbox, $mid, $suffix) = @_;
-        my $cgi = $ctx->{cgi};
         my $obj = $ctx->{-inbox};
         unless ($obj) {
                 my $r404 = invalid_inbox($ctx->{www}, $ctx, $inbox);