| 25 |
$result = db_query("SELECT c.*, u.name AS registered_name FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = %d", $node->nid); |
$result = db_query("SELECT c.*, u.name AS registered_name FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = %d", $node->nid); |
| 26 |
while ($comment = db_fetch_object($result)) { |
while ($comment = db_fetch_object($result)) { |
| 27 |
$text = check_markup($comment->comment, $comment->format, FALSE); |
$text = check_markup($comment->comment, $comment->format, FALSE); |
| 28 |
$text = apachesolr_strip_ctl_chars($text); |
$text = htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8'); |
| 29 |
|
|
| 30 |
$document = new Apache_Solr_Document(); |
$document = new Apache_Solr_Document(); |
| 31 |
// Comments have their status integers backwards compared to nodes. |
// Comments have their status integers backwards compared to nodes. |
| 58 |
$document->changed = apachesolr_date_iso($node->changed); |
$document->changed = apachesolr_date_iso($node->changed); |
| 59 |
$last_change = (isset($node->last_comment_timestamp) && $node->last_comment_timestamp > $node->changed) ? $node->last_comment_timestamp : $node->changed; |
$last_change = (isset($node->last_comment_timestamp) && $node->last_comment_timestamp > $node->changed) ? $node->last_comment_timestamp : $node->changed; |
| 60 |
$document->last_comment_or_change = apachesolr_date_iso($last_change); |
$document->last_comment_or_change = apachesolr_date_iso($last_change); |
| 61 |
$document->name = apachesolr_strip_ctl_chars($comment->name); |
$document->name = htmlspecialchars(html_entity_decode($comment->name, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8'); |
| 62 |
$path = "node/{$node->nid}"; |
$path = "node/{$node->nid}"; |
| 63 |
$document->url = url($path, array('absolute' => TRUE, 'fragment' => "comment-{$comment->cid}")); |
$document->url = url($path, array('absolute' => TRUE, 'fragment' => "comment-{$comment->cid}")); |
| 64 |
$document->path = $path; |
$document->path = $path; |