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

[ljcom] r13001: LJSUP-13388: LJ Shop - Styles

Committer: wisest-owl
LJSUP-13388: LJ Shop - Styles

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 06:45:38 UTC (rev 13000)
+++ trunk/cgi-bin/LJ/Hooks/Customize.pm	2012-12-06 08:28:23 UTC (rev 13001)
@@ -222,6 +222,17 @@
     return $LJ::SPONSORED_LAYERS{$uniq} ? 1 : 0;
 });
 
+LJ::register_hook("layer_is_buyable", sub {
+    my $layer = shift;
+
+    return 0 unless $layer->{'type'} eq 'theme';
+
+    my $theme = LJ::S2Theme->load_by_themeid($layer->{'s2lid'});
+    return 0 unless $theme;
+
+    return $theme->is_buyable;
+});
+
 LJ::register_hook("layer_is_active", sub {
     my $uniq = shift;
 

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