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

[livejournal] r23439: LJSUP-13388: LJ Shop - Styles

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

U   trunk/htdocs/customize/advanced/layerbrowse.bml
U   trunk/htdocs/customize/advanced/layersource.bml
Modified: trunk/htdocs/customize/advanced/layerbrowse.bml
===================================================================
--- trunk/htdocs/customize/advanced/layerbrowse.bml	2012-12-07 08:56:41 UTC (rev 23438)
+++ trunk/htdocs/customize/advanced/layerbrowse.bml	2012-12-07 10:53:00 UTC (rev 23439)
@@ -29,7 +29,7 @@
     my $remote = LJ::get_remote();
 
     my $is_buyable = LJ::run_hook("layer_is_buyable", $pub->{$id});
-    $id = undef if defined $is_buyable && $is_buyable;
+    $id = undef if defined $is_buyable && $is_buyable && !(LJ::Support::has_any_support_priv($remote) || $LJ::IS_DEV_SERVER);
 
     # show the public layers
     unless ($id) {
@@ -65,7 +65,7 @@
                     my $is_active = LJ::run_hook("layer_is_active", $pub->{$child}->{uniq});
                     next unless !defined $is_active || $is_active;
                     my $is_buyable = LJ::run_hook("layer_is_buyable", $pub->{$child});
-                    next if defined $is_buyable && $is_buyable;
+                    next if defined $is_buyable && $is_buyable && !(LJ::Support::has_any_support_priv($remote) || $LJ::IS_DEV_SERVER);
                     $num_children++;
                 }
                 $body .= "<ul><li>[<a href='layerbrowse.bml?expand=$lid'>";
@@ -85,7 +85,7 @@
                 my $is_active = LJ::run_hook("layer_is_active", $pub->{$_}->{'uniq'});
                 next unless !defined $is_active || $is_active;
                 my $is_buyable = LJ::run_hook("layer_is_buyable", $pub->{$_});
-                next if defined $is_buyable && $is_buyable;
+                next if defined $is_buyable && $is_buyable && !(LJ::Support::has_any_support_priv($remote) || $LJ::IS_DEV_SERVER);
                 $self->($self, $_);
             }
             $body .= "</ul>";

Modified: trunk/htdocs/customize/advanced/layersource.bml
===================================================================
--- trunk/htdocs/customize/advanced/layersource.bml	2012-12-07 08:56:41 UTC (rev 23438)
+++ trunk/htdocs/customize/advanced/layersource.bml	2012-12-07 10:53:00 UTC (rev 23439)
@@ -14,6 +14,10 @@
     my $remote = LJ::get_remote();
 
     my $id = $GET{'id'};
+
+    my $is_buyable = LJ::run_hook("layer_is_buyable", $pub->{$id});
+    $id = undef if defined $is_buyable && $is_buyable && !(LJ::Support::has_any_support_priv($remote) || $LJ::IS_DEV_SERVER);
+    
     return BML::redirect('layerbrowse.bml') unless $id =~ /^\d+$/;
 
     my $lay = defined $pub->{$id} ? $pub->{$id} : LJ::S2::load_layer($id);

Tags: bml, livejournal, 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