function activity_comments_list in Activity 6.2
List comments menu callback.
File
- activity_comments/
activity_comments.module, line 113 - Provides comment handling for activity messages
Code
function activity_comments_list($aid = 0) {
if (!empty($aid)) {
$items = array();
$result = db_query('SELECT * FROM {activity_comments} WHERE aid = %d', $aid);
while ($row = db_fetch_array($result)) {
$items[] = $row;
}
return drupal_json(array(
'status' => TRUE,
'data' => theme('activity_comments_comments', $items),
));
}
else {
return drupal_json(array(
'status' => FALSE,
'data' => '',
));
}
}