diff --git a/modules/node.module b/modules/node.module index 1eb05e96ce23ad058f47047428a446e86c430f94..e9b4847e49f592fd29a55cf90f35f90699f84c5f 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 1eb05e96ce23ad058f47047428a446e86c430f94..e9b4847e49f592fd29a55cf90f35f90699f84c5f 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 d753aeb58484408e1757054fb00d46e515db5c2b..05cca24d17c40d924d9cc8d2088fa6e739f92154 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 d753aeb58484408e1757054fb00d46e515db5c2b..05cca24d17c40d924d9cc8d2088fa6e739f92154 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); } }