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

[livejournal] r19270: LJSUP-8993: parameter view added into ge...

Committer: vtroitsky
LJSUP-8993: parameter view added into getevents/getfriendspage/getrecentcomments LJ.XMLRPC functions to retrive event/comments texts in different views, view 'stored' implemented
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-06-09 07:44:53 UTC (rev 19269)
+++ trunk/cgi-bin/ljprotocol.pl	2011-06-09 10:57:35 UTC (rev 19270)
@@ -725,10 +725,13 @@
         # add parameters to lj-tags
         #LJ::EmbedModule->expand_entry($users->{$comment->{posterid}}, \$comment->{text}, get_video_id => 1) if($req->{get_video_ids});
 
-        $comment->{text} = LJ::convert_lj_tags_to_links(
-            event => $comment->{text},
-            embed_url => $comment->url,
-        ) if $req->{parseljtags};
+        if ($req->{mode}) {
+            LJ::EmbedModule->expand_entry($users->{$comment->{posterid}}, \$comment->{text}, edit => 1) if $req->{mode} eq 'stored';
+        } elsif ($req->{parseljtags}) {
+            $comment->{text} = LJ::convert_lj_tags_to_links(
+                event => $comment->{text},
+                embed_url => $comment->url );
+        }
 
         $comment->{postername} = $users->{$comment->{posterid}}
             && $users->{$comment->{posterid}}->username;
@@ -830,11 +833,14 @@
 
         LJ::EmbedModule->expand_entry($entry->poster, \$h{event_raw}, get_video_id => 1) if $req->{get_video_ids};
 
-        $h{event_raw} = LJ::convert_lj_tags_to_links(
-            event => $h{event_raw},
-            embed_url => $entry->url,
-        ) if $req->{parseljtags};
-        
+        if ($req->{mode}) {
+            LJ::EmbedModule->expand_entry($entry->poster, \$h{event_raw}, edit => 1) if $req->{mode} eq 'stored';
+        } elsif ($req->{parseljtags}) {
+            $h{event_raw} = LJ::convert_lj_tags_to_links(
+                event => $h{event_raw},
+                embed_url => $entry->url)
+        }
+
         #userpic 
         $h{poster_userpic_url} = $h{userpic} && $h{userpic}->url;
         
@@ -3115,12 +3121,14 @@
 
         LJ::EmbedModule->expand_entry($uowner, \$t->[1], get_video_id => 1) if($req->{get_video_ids});
 
-        $t->[1] = LJ::convert_lj_tags_to_links(
-            event => $t->[1],
-            embed_url => $evt->{url},
-        ) if $req->{parseljtags};
+        if ($req->{mode}) {
+            LJ::EmbedModule->expand_entry($uowner, \$t->[1], edit => 1) if $req->{mode} eq 'stored';
+        } elsif ($req->{parseljtags}) {
+            $t->[1] = LJ::convert_lj_tags_to_links(
+                event => $t->[1],
+                embed_url => $evt->{url});
+        }
 
-
         # truncate
         if ($req->{'truncate'} >= 4) {
             my $original = $t->[1];

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