about summary refs log tree commit homepage
path: root/lib/PublicInbox/WWW.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-04-16 01:10:09 +0000
committerEric Wong <e@80x24.org>2019-04-16 20:58:23 +0000
commit6e6f7999361925e4c944f308df4bc32a1842cd69 (patch)
tree2e190ffc0b3ba4be68d82b28cb86a0d9826426ae /lib/PublicInbox/WWW.pm
parenta94349cda5763507d665809676fccc7b34575a21 (diff)
downloadpublic-inbox-6e6f7999361925e4c944f308df4bc32a1842cd69.tar.gz
'$inbox' is more human-readable, so that is for the more
human-readable name in most cases.  Making our variable naming
more consistent should make the code easier-to-review and
harder to screw up.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r--lib/PublicInbox/WWW.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index aa05a23d..6e69001c 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -186,9 +186,9 @@ sub news_cgit_fallback ($) {
 # returns undef if valid, array ref response if invalid
 sub invalid_inbox ($$) {
         my ($ctx, $inbox) = @_;
-        my $obj = $ctx->{www}->{pi_config}->lookup_name($inbox);
-        if (defined $obj) {
-                $ctx->{-inbox} = $obj;
+        my $ibx = $ctx->{www}->{pi_config}->lookup_name($inbox);
+        if (defined $ibx) {
+                $ctx->{-inbox} = $ibx;
                 return;
         }
 
@@ -402,13 +402,13 @@ sub legacy_redirects {
 
 sub r301 {
         my ($ctx, $inbox, $mid_ue, $suffix) = @_;
-        my $obj = $ctx->{-inbox};
-        unless ($obj) {
+        my $ibx = $ctx->{-inbox};
+        unless ($ibx) {
                 my $r404 = invalid_inbox($ctx, $inbox);
                 return $r404 if $r404;
-                $obj = $ctx->{-inbox};
+                $ibx = $ctx->{-inbox};
         }
-        my $url = $obj->base_url($ctx->{env});
+        my $url = $ibx->base_url($ctx->{env});
         my $qs = $ctx->{env}->{QUERY_STRING};
         if (defined $mid_ue) {
                 # common, and much nicer as '@' than '%40':