$threads = array();
foreach($items as $item) {
+
+ like_puller($a,$item,$alike,'like');
+ like_puller($a,$item,$dlike,'dislike');
+
if($item['id'] == $item['parent']) {
- // $threads[] = $item;
- $threads[] = $item;
+ $item_object = new Item($item);
+ $conv->add_thread($item_object);
}
}
- //$threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner);
- $threads = $conv->get_template_data($cmnt_tpl);
- $threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike);
++ $threads = $conv->get_template_data($cmnt_tpl, $alike, $dlike);
+ if(!$threads) {
+ logger('[ERROR] conversation : Failed to get template data.', LOGGER_DEBUG);
+ $threads = array();
+ }
+ logger('[DEBUG] conversation : $threads = '. print_r($threads, true), LOGGER_DEBUG);
}
}