sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[livejournal] r19278: OPSC-8950: getuserpics & getcomments in ...

Committer: vtroitsky
OPSC-8950: getuserpics & getcomments in anon mode fixed
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-06-10 09:59:48 UTC (rev 19277)
+++ trunk/cgi-bin/ljprotocol.pl	2011-06-10 11:16:43 UTC (rev 19278)
@@ -446,6 +446,13 @@
             is_loaded       => ($item->{_loaded} ? 1 : 0),
         };
 
+        unless($u || $item->{_show}) {
+            delete $item_data->{postername};
+            delete $item_data->{posterid};
+            delete $item_data->{datepost_unix};
+            delete $item_data->{datepost};
+        }
+
         $item_data->{body} = $item->{body} if($item->{body} && $item->{_loaded});
 
         # add parameters to lj-embed
@@ -1280,8 +1287,9 @@
 {
     my ($req, $err, $flags) = @_;
 
-    $flags->{allow_anonymous} = 1;
+    $flags->{'allow_anonymous'} = 1;
     return undef unless authenticate($req, $err, $flags);
+    $flags->{'ignorecanuse'} = 1;   #    function return public info
     return undef unless check_altusage($req, $err, $flags);
 
     my $u = $flags->{'u'};

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