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

Diff of /contributions/modules/livesearch/livesearch.module

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

revision 1.16, Tue May 8 06:19:14 2007 UTC revision 1.17, Wed Aug 8 03:08:14 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: livesearch.module,v 1.15 2007/05/08 04:46:19 kourge Exp $  // $Id: livesearch.module,v 1.16 2007/05/08 06:19:14 kourge Exp $
3    
4  /**  /**
5   * Implementation of hook_menu().   * Implementation of hook_menu().
# Line 185  function livesearch_admin_settings_valid Line 185  function livesearch_admin_settings_valid
185    if (!ctype_digit($form_values['delay_duration'])) {    if (!ctype_digit($form_values['delay_duration'])) {
186      form_set_error('delay_duration', t('The firing delay duration must be a number that is an integer.'));      form_set_error('delay_duration', t('The firing delay duration must be a number that is an integer.'));
187    }    }
   switch ($form_values['op']) {  
     case t('Reset to defaults'):  
       variable_del('target_search_box');  
       variable_del('compact_search_box');  
       variable_del('delay_duration');  
       variable_del('search_results_location');  
       variable_del('hide_snippets');  
       variable_del('show_item_info');  
       variable_del('scroll_to_search_result');  
       break;  
     case t('Save configuration'):  
       variable_set('target_search_box', (string)$form_values['target_search_box']);  
       variable_set('compact_search_box', (bool)$form_values['compact_search_box']);  
       variable_set('delay_duration', (int)$form_values['delay_duration']);  
       variable_set('search_results_location', (string)$form_values['search_results_location']);  
       variable_set('hide_snippets', (bool)$form_values['hide_snippets']);  
       variable_set('show_item_info', (bool)$form_values['show_item_info']);  
       variable_set('scroll_to_search_result', (bool)$form_values['scroll_to_search_result']);  
       break;  
   }  
188  }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.2