File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88{
99 foreach ($ topics as $ topic )
1010 {
11- $ _topic = op_api_community_topic ($ topic );
11+ $ _topic = op_api_community_topic_mini ($ topic );
1212 $ comments = $ topic ->getCommunityTopicComment ();
1313 $ _topic ['latest_comment ' ] = '' ;
1414 if (count ($ comments ))
Original file line number Diff line number Diff line change @@ -53,6 +53,19 @@ function op_api_community_topic($topic)
5353 );
5454}
5555
56+ function op_api_community_topic_mini ($ topic )
57+ {
58+ return array (
59+ 'id ' => $ topic ->getId (),
60+ 'community_id ' => $ topic ->getCommunityId (),
61+ 'community_name ' => $ topic ->getCommunity ()->getName (),
62+ 'name ' => $ topic ->getName (),
63+ 'body ' => nl2br ($ topic ->getBody ()),
64+ 'created_at ' => $ topic ->getCreatedAt (),
65+ 'ago ' => op_format_activity_time (strtotime ($ topic ->getTopicUpdatedAt ())),
66+ );
67+ }
68+
5669function op_api_community_topic_comment ($ comment )
5770{
5871 return array (
You can’t perform that action at this time.
0 commit comments