wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r10945: LJSV-1763. Userhead resets when another,...

Committer: gprochaev
LJSV-1763. Userhead resets when another, unused custom userhead expires

U   trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm	2011-08-31 06:33:46 UTC (rev 10944)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm	2011-08-31 08:30:49 UTC (rev 10945)
@@ -117,7 +117,12 @@
     my $u = LJ::load_userid($args{u});
     return undef unless $u;
 
-    $u->set_custom_usericon (undef);
+    my $subitem = $self->{subitem};
+    my ($uh_id) = $subitem =~ m#uh-(\d+)#;
+    my $uh = LJ::UserHead->get_userhead ($uh_id);
+    if ($uh && ($uh->get_uh_img eq $u->custom_usericon)) {
+        $u->set_custom_usericon (undef);
+    }
     
     # Drop this item from the list
     my $dbh = _get_dbh();

Tags: ljcom, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments