[ljcom] r9871: LJSUP-7516: allow to get comments tree w...
Committer: vad
LJSUP-7516: allow to get comments tree without collapsed comments.U trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm
Modified: trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm
===================================================================
--- trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm 2010-12-20 10:51:56 UTC (rev 9870)
+++ trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm 2010-12-20 11:05:00 UTC (rev 9871)
@@ -27,7 +27,7 @@
# page = page number (*optional*)
# view = ID of the comment for calculating page number (*optional*). if this parameter is passed page parameter
# should NOT be passed. If both parameters are specified page wins.
- #
+ # expand_all = provide all comments on page with subject and body
my $journal = $self->journal;
@@ -43,6 +43,8 @@
my $flat = defined ($params->{flat}) ? int $params->{flat} : 0; # disabled by default
my $flat_if_more = $params->{flat_if_more} > 1 ? int $params->{flat_if_more} : undef;
+ my $expand_all = $params->{expand_all} ? 1 : 0;
+
return { error => 'No ditemid' }
unless $ditemid;
@@ -61,6 +63,7 @@
userid => $userid,
view => $view,
flat => $flat,
+ expand_all => $expand_all,
});
}
@@ -162,6 +165,7 @@
expand_level => 3,
view => undef,
viewall => 0,
+ expand_all => $args->{expand_all},
init_comobj => 0,
};
