93c93
<       if ($taxonomy = module_invoke('taxonomy', 'form_all', 1)) {
---
>       if (module_exists('taxonomy')) {
95c95
<         if (variable_get('search_config_disable_category_all', 0) || !user_access('search by category')) {
---
>         if (!user_access('search by category')) {
99c99,100
<           $terms = variable_get('search_config_disable_category', array());
---
>           
> 		  $terms = variable_get('search_config_setting_category', array());
110d110
< 
111a112,113
> 	      if (variable_get('search_config_setting_category_all', "exclude") == "exclude") { 
> 		      $taxonomy = module_invoke('taxonomy', 'form_all', 1);
122a125,132
> 	      } else {
> 	      	$taxonomy = array();	
>             foreach ($terms as $k => $v) {
> 	          $term = taxonomy_get_term($v);
> 	          $vocab = taxonomy_vocabulary_load($term->vid);
> 	     	  $taxonomy[$vocab->name][$term->tid] = $term->name;
>             }
> 	      }
222,225c232,237
<         $form['search_config']['category']['search_config_disable_category_all'] = array(
<           '#type' => 'checkbox',
<           '#title' => t('Disable category search'),
<           '#default_value' => variable_get('search_config_disable_category_all', 0)
---
>         $form['search_config']['category']['search_config_setting_category_all'] = array(
>           '#type' => 'radios',
>           '#options' => array('include'=>t('Include'),'exclude'=>t('Exclude')),
>           '#title' => t('Use inclusion or exclusion mode'),
>           '#default_value' => variable_get('search_config_setting_category_all', "exclude"),
>           '#description' => t('Choose the way of disabling/enabling search on selected categories (see below). Use Exclude to disable search on selected categories. Use Include if you want to use search only on selected categories.')
228c240
<         $form['search_config']['category']['search_config_disable_category'] = array(
---
>         $form['search_config']['category']['search_config_setting_category'] = array(
234,235c246,247
<           '#default_value' => variable_get('search_config_disable_category', array()),
<           '#description' => t('Disable searching by the selected categories')
---
>           '#default_value' => variable_get('search_config_setting_category', array()),
>           '#description' => t('Enable or disable searching by the selected categories')
238d249
< 
