Commit 28b40efb authored by Dries's avatar Dries
Browse files

- Patch #239196 by Gábor Hojtsy, jhodgdon, jvandyk: indexing status shown on...

- Patch #239196 by Gábor Hojtsy, jhodgdon, jvandyk: indexing status shown on search settings page is incorrect.
parent fbd4f19d
......@@ -1550,8 +1550,8 @@ function node_search_reset() {
* Implements hook_search_status().
*/
function node_search_status() {
$total = db_query('SELECT COUNT(*) FROM {node} WHERE status = :status', array(':status' => NODE_PUBLISHED))->fetchField();
$remaining = db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.status = :status AND d.sid IS NULL OR d.reindex <> 0", array(':status' => NODE_PUBLISHED))->fetchField();
$total = db_query('SELECT COUNT(*) FROM {node}')->fetchField();
$remaining = db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0")->fetchField();
return array('remaining' => $remaining, 'total' => $total);
}
......
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