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

[ljcom] r9425: LJSUP-6635. there is no error message wh...

Committer: gprochaev
LJSUP-6635. there is no error message when trying to send userhead to a community

U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/Widget/Shop/View/UserHeads.pm
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2010-08-27 05:26:51 UTC (rev 9424)
+++ trunk/bin/upgrading/en_LJ.dat	2010-08-27 07:01:21 UTC (rev 9425)
@@ -5230,6 +5230,8 @@
 
 shop.error.userhead.not_access=suspended, purged, deleted and memorial not available to buy userhead
 
+shop.error.userhead.not_personal=You can not buy custom userheads for communities.
+
 shop.error.global.cannot_load_cart=Cannot load cart
 
 shop.error.global.not_your_cart=You are trying to view someone other's cart, and you can't do that. Try <a href="/shop/?cart=new">creating a new one</a>.

Modified: trunk/cgi-bin/LJ/Widget/Shop/View/UserHeads.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/UserHeads.pm	2010-08-27 05:26:51 UTC (rev 9424)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/UserHeads.pm	2010-08-27 07:01:21 UTC (rev 9425)
@@ -37,7 +37,10 @@
     my $remote = LJ::get_remote();
     my $gift = ((!$remote || LJ::Request->get_param('gift'))) || 0;
     my $recipient = $gift ? LJ::load_user(LJ::Request->get_param('giftto')) : undef;
-    $recipient = undef if $recipient && !$recipient->is_person;
+    if ($recipient && !$recipient->is_person) {
+        $recipient = undef;
+        $self->push_error (LJ::Lang::ml('shop.error.userhead.not_personal'));
+    }
 
     my ($sec, $min, $hour, $mday, $mon, $year) = localtime(time);
 

Tags: dat, 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