/[drupal]/contributions/modules/xapian/xapian.module
ViewVC logotype

Diff of /contributions/modules/xapian/xapian.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10.2.10, Wed Apr 1 13:44:39 2009 UTC revision 1.10.2.11, Wed Apr 1 14:00:31 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: xapian.module,v 1.10.2.9 2009/04/01 13:12:42 jeremy Exp $  // $Id: xapian.module,v 1.10.2.10 2009/04/01 13:44:39 jeremy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 836  function xapian_index_queued_nodes() { Line 836  function xapian_index_queued_nodes() {
836      if ($node) {      if ($node) {
837        if (in_array($node->type, $exclusions)) {        if (in_array($node->type, $exclusions)) {
838          // None indexable a node, log and clear it from the queue          // None indexable a node, log and clear it from the queue
         watchdog('xapian', 'Node with id %node was excluded from indexing due to type', array('%node' => $node->nid));  
839          xapian_remove_node_from_index($node);          xapian_remove_node_from_index($node);
840          db_query('DELETE FROM {xapian_index_queue} WHERE nid = %d', $node->nid);          db_query('DELETE FROM {xapian_index_queue} WHERE nid = %d', $node->nid);
841          $failed++;          $failed++;
# Line 897  function xapian_reindex_all_confirm() { Line 896  function xapian_reindex_all_confirm() {
896  function xapian_reindex_all_confirm_submit($form, &$form_state) {  function xapian_reindex_all_confirm_submit($form, &$form_state) {
897    if ($form_state['values']['confirm']) {    if ($form_state['values']['confirm']) {
898      db_query('TRUNCATE {xapian_index_queue}');      db_query('TRUNCATE {xapian_index_queue}');
899      db_query('INSERT INTO {xapian_index_queue} (nid, added) SELECT nid, UNIX_TIMESTAMP() FROM {node}');      $sql = 'INSERT INTO {xapian_index_queue} (nid, added) SELECT nid, UNIX_TIMESTAMP() FROM {node}';
900        $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));
901        if (!empty($exclusions)) {
902          $sql .= " WHERE type NOT IN ('". implode("','", $exclusions) ."')";
903        }
904    drupal_set_message("sql($sql)");
905        db_query($sql);
906      drupal_set_message(t('The search index will be rebuilt.'));      drupal_set_message(t('The search index will be rebuilt.'));
907      $form_state['redirect'] = 'admin/settings/xapian';      $form_state['redirect'] = 'admin/settings/xapian';
908    }    }

Legend:
Removed from v.1.10.2.10  
changed lines
  Added in v.1.10.2.11

  ViewVC Help
Powered by ViewVC 1.1.2