slartyblartfast (slartyblartfast) wrote in changelog,
slartyblartfast
slartyblartfast
changelog

[ljcom] r7077: LJGI-18: Bml's for iGoogle gadgets

Committer: mchernyshev
LJGI-18: Bml's for iGoogle gadgets
- in friends.bml added "comments" attribute with number of comments for each post;
- debug comment cleaned out.

U   trunk/htdocs/gadgets/friends.bml
Modified: trunk/htdocs/gadgets/friends.bml
===================================================================
--- trunk/htdocs/gadgets/friends.bml	2009-02-20 09:43:57 UTC (rev 7076)
+++ trunk/htdocs/gadgets/friends.bml	2009-02-24 08:14:23 UTC (rev 7077)
@@ -71,10 +71,13 @@
 
         $h{posteruserpic}   = $entry->userpic->url if $entry->userpic;
 
+        # As in cgi-bin/LJ/Entry.pm, method $entry->comment_list must returns a list of comments
+        # to the entry, but here, in scalar context, it returns quantity of a comments as integer number.
+        $h{comments} = $entry->comment_list;
+
         push @$out, \%h;
     }
 
-    #return XMLout({ 'item' => $out, 'nextpage' => 1, 'previouspage' => 2 }, TODO: skip
     return XMLout({ 'item' => $out },
         XMLDecl  => '<?xml version="1.0" encoding="utf-8" ?>',
         RootName => 'friendspage');

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