summaryrefslogtreecommitdiff
path: root/modules/search/search.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/search/search.module')
-rw-r--r--modules/search/search.module8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/search/search.module b/modules/search/search.module
index 20545c219..46ec2baf2 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -512,11 +512,9 @@ function search_index($sid, $type, $text) {
$linknid = $match[1];
if ($linknid > 0) {
// Note: ignore links to uncacheable nodes to avoid redirect bugs.
- $node = db_fetch_object(db_query('SELECT n.title, n.nid, n.vid, r.format FROM {node} n INNER JOIN {node_revision} r ON n.vid = r.vid WHERE n.nid = %d', $linknid));
- if (filter_format_allowcache($node->format)) {
- $link = TRUE;
- $linktitle = $node->title;
- }
+ $node = db_query('SELECT title, nid, vid FROM {node} WHERE nid = :nid', array(':nid' => $linknid))->fetchObject();
+ $link = TRUE;
+ $linktitle = $node->title;
}
}
}