'fieldset', '#title' => t('Indexing'), ); $form['indexing']['taxonomy_facets_rebuild'] = array( '#type' => 'markup', '#value' => t('If you are getting inconsistent results when navigating taxonomy facets, try to rebuild the Taxonomy Facets index. However, inconsistencies might denote a bug; please report any bug to Faceted Search\'s issue queue.', array('@rebuild' => url('admin/settings/faceted_search/taxonomy_facets/rebuild'))), ); // TODO: Redo as POST request. return drupal_render($form); } else { return '
'. t('There are currently no vocabularies. Go to the !page first to create vocabularies.', array('!page' => l(t('Categories page'), 'admin/content/taxonomy'))) .'
'; } } /** * Menu callback for marking all term node associations as needing an update. */ function taxonomy_facets_rebuild($goto_admin = TRUE) { // Mark nodes with the current time, unless they're already marked. db_query('UPDATE {taxonomy_facets_node} SET changed = %d WHERE changed = 0', time()); drupal_set_message(t('Indexing will start on the next cron run.', array('@cron' => url('admin/reports/status/run-cron', array('query' => drupal_get_destination()))))); if ($goto_admin) { drupal_goto('admin/settings/faceted_search/taxonomy_facets'); } }