Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[livejournal] r19173: LJSV-1593: Share button on new ControlSt...

Committer: dnikolaev
LJSV-1593: Share button on new ControlStrip needs to be hidden on protected entries

U   trunk/cgi-bin/LJ/ControlStrip.pm
Modified: trunk/cgi-bin/LJ/ControlStrip.pm
===================================================================
--- trunk/cgi-bin/LJ/ControlStrip.pm	2011-05-30 09:06:35 UTC (rev 19172)
+++ trunk/cgi-bin/LJ/ControlStrip.pm	2011-05-30 09:17:44 UTC (rev 19173)
@@ -81,6 +81,18 @@
     $data_journal->{display} = LJ::ljuser($journal);
     $data_journal->{has_friendspage_per_day} = ($journal->get_cap('friendspage_per_day') ? 1 : 0);
 
+    $data_journal->{view_entry_is_valid} = 0;
+    if ($data_journal->{view_entry}) {
+        my $uri = LJ::Request->uri();
+        if ($uri =~ /(\d+)\.html/) {
+            my $entry = LJ::Entry->new($journal, ditemid => $1);
+            if ($entry and $entry->correct_anum) {
+                $data_journal->{view_entry_is_valid} = 1;
+                $data_journal->{view_entry_is_public} = ($entry->is_public() ? 1 : 0);
+            }
+        }
+    }
+
     if ($remote)
     {
         $data_remote->{is_logged_in} = 1;

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