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

[ljcom] r13002: LJSUP-14485: Identity and unlogged user ...

Committer: wisest-owl
LJSUP-14485: Identity and unlogged user shouldn't be able to buy or view example of theme applying

U   trunk/cgi-bin/LJ/Hooks/Customize.pm
Modified: trunk/cgi-bin/LJ/Hooks/Customize.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Customize.pm	2012-12-06 08:28:23 UTC (rev 13001)
+++ trunk/cgi-bin/LJ/Hooks/Customize.pm	2012-12-06 11:23:59 UTC (rev 13002)
@@ -270,7 +270,7 @@
     $needed_acct_type = "plus" if $plus_allow_layers{$theme->uniq} || $plus_allow_layers{$theme->layout_uniq};
 
     my $upgrade_url = "$LJ::SITEROOT/manage/account/";
-    if ($u->is_comm) {
+    if ($u && $u->is_comm) {
         if ($needed_acct_type eq "plus") {
             $upgrade_url = "$LJ::SITEROOT/community/account.bml?authas=" . $u->user;
         } else { # paid
@@ -303,7 +303,7 @@
     my $u = shift;
     my $theme = shift;
 
-    return "" if $u->get_cap('paid');
+    return "" if $u && $u->get_cap('paid');
 
     my $upgrade_url = LJ::run_hook("customize_upgrade_url", $u, $theme);
 

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