/[drupal]/contributions/modules/apachesolr/contrib/apachesolr_commentsearch/apachesolr_commentsearch.module
ViewVC logotype

Diff of /contributions/modules/apachesolr/contrib/apachesolr_commentsearch/apachesolr_commentsearch.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.3 by robertDouglass, Fri Nov 20 18:14:07 2009 UTC revision 1.1.2.4 by robertDouglass, Sun Nov 22 13:00:52 2009 UTC
# Line 25  function apachesolr_commentsearch_node_t Line 25  function apachesolr_commentsearch_node_t
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.
# Line 58  function apachesolr_commentsearch_node_t Line 58  function apachesolr_commentsearch_node_t
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;

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

  ViewVC Help
Powered by ViewVC 1.1.3