summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-12-21 14:30:09 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-12-21 14:30:09 +0000
commit19aad8934fabb6a7334b88ce343ea62ae0f9e359 (patch)
treebfb21dac0aa66ac8bd446fc5d256abba596ae9dd
parente67def3a12273204feec85ff9f5ea84a8854cfd6 (diff)
downloadbrdo-19aad8934fabb6a7334b88ce343ea62ae0f9e359.tar.gz
brdo-19aad8934fabb6a7334b88ce343ea62ae0f9e359.tar.bz2
- #34826: Search results don't include last part of longer pages
-rw-r--r--modules/node.module7
-rw-r--r--modules/node/node.module7
-rw-r--r--modules/search.module4
-rw-r--r--modules/search/search.module4
4 files changed, 8 insertions, 14 deletions
diff --git a/modules/node.module b/modules/node.module
index 1eb05e96c..e9b4847e4 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -422,14 +422,11 @@ function node_save(&$node) {
if ($node->revision) {
$node->old_vid = $node->vid;
$node->vid = db_next_id('{node_revisions}_vid');
- // We always update the timestamp for new revisions.
- $node->changed = time();
}
}
- if (!$node->changed) {
- $node->changed = time();
- }
+ // The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
+ $node->changed = time();
// Split off revisions data to another structure
$revisions_table_values = array('nid' => $node->nid, 'vid' => $node->vid,
diff --git a/modules/node/node.module b/modules/node/node.module
index 1eb05e96c..e9b4847e4 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -422,14 +422,11 @@ function node_save(&$node) {
if ($node->revision) {
$node->old_vid = $node->vid;
$node->vid = db_next_id('{node_revisions}_vid');
- // We always update the timestamp for new revisions.
- $node->changed = time();
}
}
- if (!$node->changed) {
- $node->changed = time();
- }
+ // The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
+ $node->changed = time();
// Split off revisions data to another structure
$revisions_table_values = array('nid' => $node->nid, 'vid' => $node->vid,
diff --git a/modules/search.module b/modules/search.module
index d753aeb58..05cca24d1 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -583,7 +583,7 @@ function search_index($sid, $type, $text) {
// Insert results into search index
foreach ($results[0] as $word => $score) {
- db_query("INSERT INTO {search_index} (word, sid, type, score) VALUES ('%s', %d, '%s', %d)", $word, $sid, $type, $score);
+ db_query("INSERT INTO {search_index} (word, sid, type, score) VALUES ('%s', %d, '%s', %f)", $word, $sid, $type, $score);
search_dirty($word);
}
unset($results[0]);
@@ -591,7 +591,7 @@ function search_index($sid, $type, $text) {
// Now insert links to nodes
foreach ($results as $nid => $words) {
foreach ($words as $word => $score) {
- db_query("INSERT INTO {search_index} (word, sid, type, fromsid, fromtype, score) VALUES ('%s', %d, '%s', %d, '%s', %d)", $word, $nid, 'node', $sid, $type, $score);
+ db_query("INSERT INTO {search_index} (word, sid, type, fromsid, fromtype, score) VALUES ('%s', %d, '%s', %d, '%s', %f)", $word, $nid, 'node', $sid, $type, $score);
search_dirty($word);
}
}
diff --git a/modules/search/search.module b/modules/search/search.module
index d753aeb58..05cca24d1 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -583,7 +583,7 @@ function search_index($sid, $type, $text) {
// Insert results into search index
foreach ($results[0] as $word => $score) {
- db_query("INSERT INTO {search_index} (word, sid, type, score) VALUES ('%s', %d, '%s', %d)", $word, $sid, $type, $score);
+ db_query("INSERT INTO {search_index} (word, sid, type, score) VALUES ('%s', %d, '%s', %f)", $word, $sid, $type, $score);
search_dirty($word);
}
unset($results[0]);
@@ -591,7 +591,7 @@ function search_index($sid, $type, $text) {
// Now insert links to nodes
foreach ($results as $nid => $words) {
foreach ($words as $word => $score) {
- db_query("INSERT INTO {search_index} (word, sid, type, fromsid, fromtype, score) VALUES ('%s', %d, '%s', %d, '%s', %d)", $word, $nid, 'node', $sid, $type, $score);
+ db_query("INSERT INTO {search_index} (word, sid, type, fromsid, fromtype, score) VALUES ('%s', %d, '%s', %d, '%s', %f)", $word, $nid, 'node', $sid, $type, $score);
search_dirty($word);
}
}