Commit 19aad893 authored by Steven Wittens's avatar Steven Wittens
Browse files

- #34826: Search results don't include last part of longer pages

parent e67def3a
......@@ -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,
......
......@@ -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,
......
......@@ -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);
}
}
......
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment