function forum_update_7011 in Drupal 7
Update {forum_index} so that only published nodes are indexed.
Related topics
File
- modules/
forum/ forum.install, line 447 - Install, update, and uninstall functions for the Forum module.
Code
function forum_update_7011() {
$select = db_select('node', 'n')
->fields('n', array(
'nid',
))
->condition('status', 0);
db_delete('forum_index')
->condition('nid', $select, 'IN')
->execute();
}