/[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.12, Wed Apr 1 14:00:58 2009 UTC revision 1.10.2.13, Wed Apr 1 14:18:07 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: xapian.module,v 1.10.2.11 2009/04/01 14:00:31 jeremy Exp $  // $Id: xapian.module,v 1.10.2.12 2009/04/01 14:00:58 jeremy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 749  function _xapian_queue_index($node) { Line 749  function _xapian_queue_index($node) {
749  function xapian_index_node(&$node) {  function xapian_index_node(&$node) {
750    $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));    $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));
751    if (in_array($node->type, $exclusions)) {    if (in_array($node->type, $exclusions)) {
752        xapian_remove_node_from_index($node);
753      return;      return;
754    }    }
755    if (variable_get('xapian_index_immediately', TRUE)) {    if (variable_get('xapian_index_immediately', TRUE)) {
# Line 896  function xapian_reindex_all_confirm() { Line 897  function xapian_reindex_all_confirm() {
897  function xapian_reindex_all_confirm_submit($form, &$form_state) {  function xapian_reindex_all_confirm_submit($form, &$form_state) {
898    if ($form_state['values']['confirm']) {    if ($form_state['values']['confirm']) {
899      db_query('TRUNCATE {xapian_index_queue}');      db_query('TRUNCATE {xapian_index_queue}');
900      $sql = 'INSERT INTO {xapian_index_queue} (nid, added) SELECT nid, UNIX_TIMESTAMP() FROM {node}';      db_query('INSERT INTO {xapian_index_queue} (nid, added) SELECT nid, UNIX_TIMESTAMP() FROM {node}');
     $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));  
     if (!empty($exclusions)) {  
       $sql .= " WHERE type NOT IN ('". implode("','", $exclusions) ."')";  
     }  
     db_query($sql);  
901      drupal_set_message(t('The search index will be rebuilt.'));      drupal_set_message(t('The search index will be rebuilt.'));
902      $form_state['redirect'] = 'admin/settings/xapian';      $form_state['redirect'] = 'admin/settings/xapian';
903    }    }

Legend:
Removed from v.1.10.2.12  
changed lines
  Added in v.1.10.2.13

  ViewVC Help
Powered by ViewVC 1.1.2