[livejournal] r23330: LJSUP-14312: Link to userpic of deleted ...
Committer: wisest-owl
LJSUP-14312: Link to userpic of deleted user is brokenU trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm 2012-11-20 08:44:57 UTC (rev 23329)
+++ trunk/cgi-bin/Apache/LiveJournal.pm 2012-11-20 08:49:56 UTC (rev 23330)
@@ -1580,7 +1580,11 @@
# Load the user object and pic and make sure the picture is viewable
my $u = LJ::load_userid($userid);
- return LJ::Request::NOT_FOUND unless $u && $u->{'statusvis'} !~ /[XS]/;
+ if ($u && $u->{'statusvis'} =~ /[XS]/) {
+ LJ::Request->pnotes ('error' => 'e404');
+ LJ::Request->pnotes ('remote' => LJ::get_remote());
+ return LJ::Request::NOT_FOUND;
+ }
my %upics;
LJ::load_userpics(\%upics, [ $u, $picid ]);
@@ -1669,8 +1673,8 @@
my $path = LJ::Blob::get_rel_path( $root, $u, "userpic", $fmt, $picid );
LJ::Request->header_out( 'X-REPROXY-FILE', $path );
+
$send_headers->();
-
return LJ::Request::OK
}
