? .DS_Store
? flexifilter_remove_step.patch
Index: flexifilter.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.admin.inc,v
retrieving revision 1.13
diff -u -p -r1.13 flexifilter.admin.inc
--- flexifilter.admin.inc	24 Jan 2008 01:57:10 -0000	1.13
+++ flexifilter.admin.inc	18 Feb 2008 15:00:35 -0000
@@ -136,9 +136,6 @@ function flexifilter_filter_edit_compone
       elseif ($key == 'condition') {
         $us['condition'] = flexifilter_filter_edit_condition_data($value);
       }
-      elseif ($key == 'step') {
-        $us[$key] = $value;
-      }
       else {
         $us['setting_'. $key] = $value;
       }
@@ -166,9 +163,6 @@ function flexifilter_filter_edit_form_ne
     'weight' => 10000,
     'is_new' => true,
   );
-  if ($component['step'] == 'either') {
-    $data['step'] = 'process';
-  }
   if ($component['is_container']) {
     if ($component['contains_condition']) {
       $data['condition'] = array('class' => '');
@@ -352,26 +346,6 @@ function flexifilter_filter_edit_form_co
       }
     }
   }
-  if ($component['step'] == 'either') {
-    if ($show_advanced) {
-      $form['step'] = array(
-        '#type' => 'select',
-        '#title' => t('Step'),
-        '#options' => array(
-          'process' => t('Processing'),
-          'prepare' => t('Preparation'),
-        ),
-        '#description' => t('The filtering step to perform this action in.'),
-        '#default_value' => $data['step'],
-      );
-    }
-    else {
-      $form['step'] = array(
-        '#type' => 'hidden',
-        '#value' => $data['step'],
-      );
-    }
-  }
   $form['move'] = array(
     '#type' => 'select',
     '#title' => t('Re/move this'),
@@ -539,12 +513,6 @@ function flexifilter_filter_edit_form($f
     '#description' => t('A short description of what this flexifilter does.'),
     '#default_value' => $data['basic']['description'],
   );
-  $form['basic']['advanced'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show advanced options'),
-    '#default_value' => $data['basic']['advanced'],
-    '#description' => t('Advanced options currently only include the processing step option, which allows you to place some components into the filtering preparation step. You should only do so if it is critical that they be performed in the preparation step rather than the processing step.'),
-  );
   $form['components'] = flexifilter_filter_edit_form_components($data['components'], $data['components'], $data['basic']['advanced'] == 1);
   $form['components']['id_prefix'] = array('#type' => 'hidden', '#value' => $data['components']['id_prefix']);
   $form['components']['id_next'] = array('#type' => 'hidden', '#value' => $data['components']['id_next']);
@@ -609,9 +577,6 @@ function flexifilter_filter_edit_form_co
           $component['settings'][substr($key, 8)] = $value;
         }
       }
-      if (isset($data_us['step'])) {
-        $component['settings']['step'] = $data_us['step'];
-      }
       if (isset($data_us['components'])) {
         $component['settings']['components'] = flexifilter_filter_edit_form_components_from_data($data_us['components'], $data_base);
       }
Index: flexifilter.components.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.components.inc,v
retrieving revision 1.12
diff -u -p -r1.12 flexifilter.components.inc
--- flexifilter.components.inc	22 Jan 2008 00:48:28 -0000	1.12
+++ flexifilter.components.inc	18 Feb 2008 15:00:35 -0000
@@ -27,7 +27,6 @@ function flexifilter_flexifilter_compone
     'contains_components' => TRUE,
     'callback' => 'flexifilter_component_if',
     'group' => t('Control Structures'),
-    'step' => 'both',
   );
   $components['flexifilter_control_while'] = array(
     'label' => t('While'),
@@ -36,7 +35,6 @@ function flexifilter_flexifilter_compone
     'contains_components' => TRUE,
     'callback' => 'flexifilter_component_while',
     'group' => t('Control Structures'),
-    'step' => 'both',
   );
 
   // Simple text operations
@@ -45,42 +43,36 @@ function flexifilter_flexifilter_compone
     'description' => t('Does a primtive search & replace on the text.'),
     'callback' => 'flexifilter_component_text_simple_replace',
     'group' => t('Text: Simple'),
-    'step' => 'either',
   );
   $components['flexifilter_text_regex'] = array(
     'label' => t('Regex Text Replace'),
     'description' => t('Does a search & replace on the text using regular expressions.'),
     'callback' => 'flexifilter_component_text_regex_replace',
     'group' => t('Text: Intermediate'),
-    'step' => 'either',
   );
   $components['flexifilter_text_alternation'] = array(
     'label' => t('Pattern-based Text Replacement'),
     'description' => t('Cycles through several replacements on the text.'),
     'callback' => 'flexifilter_component_text_pattern_replace',
     'group' => t('Text: Intermediate'),
-    'step' => 'either',
   );
   $components['flexifilter_text_append'] = array(
     'label' => t('Simple Text Append'),
     'description' => t('Appends text to the end.'),
     'callback' => 'flexifilter_component_text_append',
     'group' => t('Text: Simple'),
-    'step' => 'either',
   );
   $components['flexifilter_text_prepend'] = array(
     'label' => t('Simple Text Prepend'),
     'description' => t('Prepends text to the beginning.'),
     'callback' => 'flexifilter_component_text_prepend',
     'group' => t('Text: Simple'),
-    'step' => 'either',
   );
   $components['flexifilter_text_substr'] = array(
     'label' => t('Simple Text Slice'),
     'description' => t('"Slices" a certain number of characters off either end of the text.'),
     'callback' => 'flexifilter_component_text_substr',
     'group' => t('Text: Simple'),
-    'step' => 'either',
   );
   $components['flexifilter_advanced_append'] = array(
     'label' => t('Advanced Text Append'),
@@ -88,7 +80,6 @@ function flexifilter_flexifilter_compone
     'callback' => 'flexifilter_component_advanced_append',
     'group' => t('Text: Intermediate'),
     'contains_components' => TRUE,
-    'step' => 'either',
   );
   $components['flexifilter_advanced_prepend'] = array(
     'label' => t('Advanced Text Prepend'),
@@ -96,7 +87,6 @@ function flexifilter_flexifilter_compone
     'callback' => 'flexifilter_component_advanced_prepend',
     'group' => t('Text: Intermediate'),
     'contains_components' => TRUE,
-    'step' => 'either',
   );
 
   // Advanced.
@@ -106,7 +96,6 @@ function flexifilter_flexifilter_compone
     'callback' => 'flexifilter_component_advanced_php',
     'group' => t('Advanced'),
     'is_advanced' => TRUE,
-    'step' => 'either',
   );
 
   // Chunks!
@@ -116,7 +105,6 @@ function flexifilter_flexifilter_compone
     'callback' => 'flexifilter_component_chunk_grab',
     'group' => t('Chunks'),
     'contains_components' => TRUE,
-    'step' => 'either',
   );
 
   // Allow existing filters to be used as components
@@ -131,7 +119,6 @@ function flexifilter_flexifilter_compone
             'callback' => 'flexifilter_existing_filter_as_component',
             'callback_arguments' => array($module, $delta),
             'group' => t('Existing Filters'),
-            'step' => 'both',
           );
         }
       }
@@ -146,7 +133,6 @@ function flexifilter_flexifilter_compone
       'callback' => 'flexifilter_existing_flexifilter_as_component',
       'callback_arguments' => array($fid),
       'group' => t('Existing Filters'),
-      'step' => 'both',
     );
   }
 
@@ -175,8 +161,7 @@ function flexifilter_component_text_simp
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       return str_replace($settings['find'], isset($settings['replace']) ? $settings['replace'] : '', $text);
   }
   return $text;
@@ -206,8 +191,7 @@ function flexifilter_component_text_rege
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       return preg_replace('~'. str_replace('~', '\~', $settings['find']) .'~', isset($settings['replace']) ? $settings['replace'] : '', $text);
   }
   return $text;
@@ -223,8 +207,7 @@ function flexifilter_component_if($op, $
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       if (flexifilter_invoke_condition($settings['condition'], $op, $text) == TRUE) {
         $text = flexifilter_invoke_components($settings['components'], $op, $text);
       }
@@ -254,23 +237,15 @@ function flexifilter_component_while($op
       }
       return $form;
 
-    case 'prepare':
-    case 'process':
-      // Optimization case; the loop is skipped if none of the components do anything
-      // in this step. Also helps prevent naive infinite loops like this one:
-      // while (text contains "example") replace "example" with "e.g."
-      // As the replacement would only run in processing, the while loop would loop
-      // forever in preparation.
-      $limit = (integer)$settings['limit'];
+    case 'run':
+      $limit = (integer) $settings['limit'];
       $n = 0;
-      if (flexifilter_components_involve_step($settings['components'], $op)) {
-        while (flexifilter_invoke_condition($settings['condition'], $op, $text) == TRUE) {
-          $text = flexifilter_invoke_components($settings['components'], $op, $text);
-          $n++;
-          if ($n >= $limit) {
-            drupal_set_message(t('Flexifilter while loop aborted at @count iterations. Consider tweaking the limit or condition.', array('@count' => $n)));
-            break;
-          }
+      while (flexifilter_invoke_condition($settings['condition'], $text) == TRUE) {
+        $text = flexifilter_invoke_components($settings['components'], $text);
+        $n++;
+        if ($n >= $limit) {
+          drupal_set_message(t('Flexifilter while loop aborted at @count iterations. Consider tweaking the limit or condition.', array('@count' => $n)));
+          break;
         }
       }
     default:
@@ -337,8 +312,7 @@ function flexifilter_existing_filter_as_
       }
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $oldconf = _flexifilter_push_conf($settings);
       $text = module_invoke($module, 'filter', $op, $delta, 1, $text);
       _flexifilter_pop_conf($oldconf);
@@ -358,8 +332,7 @@ function flexifilter_existing_flexifilte
     case 'settings':
       return array();
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $filters = flexifilter_get_filters();
       $filter = $filters[$fid];
       return flexifilter_invoke_components($filter['components'], $op, $text);
@@ -391,8 +364,7 @@ function flexifilter_component_text_patt
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $find    = $settings['find'];
       $i       = 0;
       $count   = 1;
@@ -464,8 +436,7 @@ function flexifilter_component_chunk_gra
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $start          = $settings['starts'];
       $end            = $settings['ends'];
       $pass_limits    = $settings['pass_limits'];
@@ -520,8 +491,7 @@ function flexifilter_component_text_appe
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $append = isset($settings['text']) ? $settings['text'] : '';
       return $text . $append;
   }
@@ -543,8 +513,7 @@ function flexifilter_component_text_prep
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $prepend = isset($settings['text']) ? $settings['text'] : '';
       return $prepend . $text;
   }
@@ -572,8 +541,7 @@ function flexifilter_component_text_subs
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $substr_start = isset($settings['substr_start']) ? $settings['substr_start'] : '0';
       $substr_length = isset($settings['substr_length']) ? $settings['substr_length'] : '';
       if ($substr_length === '') {
@@ -599,8 +567,7 @@ function flexifilter_component_advanced_
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $code = isset($settings['code']) ? $settings['code'] : 'return $text;';
       return eval($code);
   }
@@ -616,8 +583,7 @@ function flexifilter_component_advanced_
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $append = flexifilter_invoke_components($settings['components'], $op, $text);
       return $text . $append;
   }
@@ -633,8 +599,7 @@ function flexifilter_component_advanced_
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $prepend = flexifilter_invoke_components($settings['components'], $op, $text);
       return $prepend . $text;
   }
Index: flexifilter.conditions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.conditions.inc,v
retrieving revision 1.6
diff -u -p -r1.6 flexifilter.conditions.inc
--- flexifilter.conditions.inc	22 Jan 2008 00:48:28 -0000	1.6
+++ flexifilter.conditions.inc	18 Feb 2008 15:00:35 -0000
@@ -51,22 +51,6 @@ function flexifilter_flexifilter_conditi
     'callback' => 'flexifilter_condition_text_length',
     'group' => t('Text'),
   );
-  $conditions['flexifilter_step_prepare'] = array(
-    'label' => t('Is preparation step'),
-    'description' => t('True only during the preparation step of filtering.'),
-    'callback' => 'flexifilter_condition_step',
-    'callback_arguments' => array('prepare'),
-    'group' => t('Filtering Steps'),
-    'is_advanced' => TRUE,
-  );
-  $conditions['flexifilter_step_process'] = array(
-    'label' => t('Is processing step'),
-    'description' => t('True only during the processing step of filtering.'),
-    'callback' => 'flexifilter_condition_step',
-    'callback_arguments' => array('process'),
-    'group' => t('Filtering Steps'),
-    'is_advanced' => TRUE,
-  );
   // Advanced.
   $conditions['flexifilter_advanced_php'] = array(
     'label' => t('PHP code'),
@@ -101,8 +85,7 @@ function flexifilter_condition_text_sear
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       if (isset($settings['is_regex']) && $settings['is_regex'] == 1) {
         return preg_match('~'. str_replace('~', '\~', $settings['find']) .'~', $text) == 1;
       }
@@ -142,8 +125,7 @@ function flexifilter_condition_text_leng
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $length   = strlen($text);
       $operator = isset($settings['operator']) ? $settings['operator'] : 0;
       $num      = isset($settings['num']) ? $settings['num'] : variable_get('teaser_length', 600);;
@@ -176,8 +158,7 @@ function flexifilter_condition_group_and
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       foreach ($settings['conditions'] as $condition) {
         if (flexifilter_invoke_condition($condition, $op, $text) == FALSE) {
           return FALSE;
@@ -197,8 +178,7 @@ function flexifilter_condition_group_or(
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       foreach ($settings['conditions'] as $condition) {
         if (flexifilter_invoke_condition($condition, $op, $text) == TRUE) {
           return TRUE;
@@ -218,8 +198,7 @@ function flexifilter_condition_group_not
       $form = array();
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       foreach ($settings['conditions'] as $condition) {
         if (flexifilter_invoke_condition($condition, $op, $text) == FALSE) {
           return TRUE;
@@ -241,32 +220,13 @@ function flexifilter_condition_constant(
     case 'settings':
       return array();
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       return $constant;
   }
 }
 
 /**
  * Flexifilter condition callback.
- * Returns TRUE if the current step matches $step.
- *
- * @param $step
- *   The step to match, either 'prepare' or 'process'.
- */
-function flexifilter_condition_step($step, $op, $settings, $text) {
-  switch ($op) {
-    case 'settings':
-      return array();
-
-    case 'prepare':
-    case 'process':
-      return $step == $op;
-  }
-}
-
-/**
- * Flexifilter condition callback.
  * Returns whatever the custom php code written by the user returns.
  * Is somewhat safe (as in it won't break your site) in that it only runs during the filtering process, thus not on every page load.
  */
@@ -282,10 +242,9 @@ function flexifilter_condition_advanced_
       );
       return $form;
 
-    case 'prepare':
-    case 'process':
+    case 'run':
       $code = isset($settings['code']) ? $settings['code'] : 'return TRUE;';
-      return eval($code);
+      return drupal_eval($code);
   }
 }
 
Index: flexifilter.flexifilters.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.flexifilters.inc,v
retrieving revision 1.4
diff -u -p -r1.4 flexifilter.flexifilters.inc
--- flexifilter.flexifilters.inc	22 Jan 2008 00:48:28 -0000	1.4
+++ flexifilter.flexifilters.inc	18 Feb 2008 15:00:35 -0000
@@ -18,7 +18,6 @@ function flexifilter_flexifilters() {
           'class' => 'flexifilter_text_prepend',
           'settings' => array(
             'text' => '</nowiki>',
-            'step' => 'process',
           ),
           'id' => '2',
         ),
@@ -26,7 +25,6 @@ function flexifilter_flexifilters() {
           'class' => 'flexifilter_text_append',
           'settings' => array(
             'text' => '<nowiki>',
-            'step' => 'process',
           ),
           'id' => '3',
         ),
@@ -38,14 +36,12 @@ function flexifilter_flexifilters() {
             'pass_limits' => 0,
             'case_sensitive' => 0,
             'include_rest' => 1,
-            'step' => 'process',
             'components' => array(
               array(
                 'class' => 'flexifilter_text_alternation',
                 'settings' => array(
                   'find' => '====',
                   'replace' => "<h4>\n</h4>",
-                  'step' => 'process',
                 ),
                 'id' => '5',
               ),
@@ -54,7 +50,6 @@ function flexifilter_flexifilters() {
                 'settings' => array(
                   'find' => '===',
                   'replace' => "<h3>\n</h3>",
-                  'step' => 'process',
                 ),
                 'id' => '6',
               ),
@@ -63,7 +58,6 @@ function flexifilter_flexifilters() {
                 'settings' => array(
                   'find' => '==',
                   'replace' => "<h2>\n</h2>",
-                  'step' => 'process',
                 ),
                 'id' => '7',
               ),
@@ -72,7 +66,6 @@ function flexifilter_flexifilters() {
                 'settings' => array(
                   'find' => '\'\'\'',
                   'replace' => "<strong>\n</strong>",
-                  'step' => 'process',
                 ),
                 'id' => '8',
               ),
@@ -81,7 +74,6 @@ function flexifilter_flexifilters() {
                 'settings' => array(
                   'find' => '\'\'',
                   'replace' => "<em>\n</em>",
-                  'step' => 'process',
                 ),
                 'id' => '9',
               ),
@@ -93,7 +85,6 @@ function flexifilter_flexifilters() {
                   'pass_limits' => 0,
                   'case_sensitive' => 0,
                   'include_rest' => 1,
-                  'step' => 'process',
                   'components' => array(
                     array(
                       'class' => 'flexifilter_control_if',
@@ -104,7 +95,6 @@ function flexifilter_flexifilters() {
                             'settings' => array(
                               'find' => '~',
                               'replace' => '\\~',
-                              'step' => 'process',
                             ),
                             'id' => '12',
                           ),
@@ -112,21 +102,18 @@ function flexifilter_flexifilters() {
                             'class' => 'flexifilter_text_append',
                             'settings' => array(
                               'text' => '~~',
-                              'step' => 'process',
                             ),
                             'id' => '13',
                           ),
                           array(
                             'class' => 'flexifilter_advanced_append',
                             'settings' => array(
-                              'step' => 'process',
                               'components' => array(
                                 array(
                                   'class' => 'flexifilter_text_replace',
                                   'settings' => array(
                                     'find' => '~~',
                                     'replace' => '</a>',
-                                    'step' => 'process',
                                   ),
                                   'id' => '23',
                                 ),
@@ -139,7 +126,6 @@ function flexifilter_flexifilters() {
                             'settings' => array(
                               'find' => '~~',
                               'replace' => '">',
-                              'step' => 'process',
                             ),
                             'id' => '26',
                           ),
@@ -147,7 +133,6 @@ function flexifilter_flexifilters() {
                             'class' => 'flexifilter_text_prepend',
                             'settings' => array(
                               'text' => '<a href="http://en.wikipedia.org/wiki/',
-                              'step' => 'process',
                             ),
                             'id' => '24',
                           ),
@@ -156,7 +141,6 @@ function flexifilter_flexifilters() {
                             'settings' => array(
                               'find' => '\\~',
                               'replace' => '~',
-                              'step' => 'process',
                             ),
                             'id' => '28',
                           ),
@@ -186,7 +170,6 @@ function flexifilter_flexifilters() {
                             'class' => 'flexifilter_text_prepend',
                             'settings' => array(
                               'text' => '<a href="http://en.wikipedia.org/wiki/',
-                              'step' => 'process',
                             ),
                             'id' => '33',
                           ),
@@ -195,7 +178,6 @@ function flexifilter_flexifilters() {
                             'settings' => array(
                               'find' => '|',
                               'replace' => '">',
-                              'step' => 'process',
                             ),
                             'id' => '34',
                           ),
@@ -203,7 +185,6 @@ function flexifilter_flexifilters() {
                             'class' => 'flexifilter_text_append',
                             'settings' => array(
                               'text' => '</a>',
-                              'step' => 'process',
                             ),
                             'id' => '35',
                           ),
Index: flexifilter.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.install,v
retrieving revision 1.5
diff -u -p -r1.5 flexifilter.install
--- flexifilter.install	22 Jan 2008 00:48:28 -0000	1.5
+++ flexifilter.install	18 Feb 2008 15:00:35 -0000
@@ -132,3 +132,11 @@ function flexifilter_schema() {
   return $schema;
 }
 
+function flexifilter_update_1() {
+  $query = db_query('SELECT pid, settings FROM {flexifilters_parts}');
+  while ($result = db_fetch_array($query)) {
+    $settings = unserialize($result['settings']);
+    unset($settings['step']);
+    db_query("UPDATE {flexifilters_parts} SET settings = '%s' WHERE pid = %d", serialize($settings), $result['pid']);
+  }
+}
Index: flexifilter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.module,v
retrieving revision 1.14
diff -u -p -r1.14 flexifilter.module
--- flexifilter.module	23 Jan 2008 22:43:16 -0000	1.14
+++ flexifilter.module	18 Feb 2008 15:00:35 -0000
@@ -207,11 +207,11 @@ function flexifilter_get_condition_list(
  * Causes a component to run
  *
  * @param $component A component (e.g. from flexifilter_get_component_list())
- * @param $op The operation to run on the component. "settings", "prepare" and "process" are valid operations.
+ * @param $op The operation to run on the component. "settings" and "run" are valid operations.
  * @param $settings The values from the component's settings form (can be an empty array for "settings" operation)
  * @param $text The text to run the component over (ignored for "settings" operation)
  *
- * @return "prepare" and "process" operations return the new text, "settings" returns an FAPI table. For any
+ * @return The "run" operation returns the new text, "settings" returns an FAPI table. For any
  * operations that the component doesn't support, it will return $text.
  */
 function flexifilter_invoke_component($component, $op, $settings = array(), $text = '') {
@@ -224,10 +224,10 @@ function flexifilter_invoke_component($c
  * @param $data Array containing condition data. Should have at least two keys:
  *  - class : The class name of the component
  *  - settings : Array of settings to pass to the component
- * @param $op The operation to run on the condition. "settings", "prepare" and "process" are valid operations.
+ * @param $op The operation to run on the condition. "settings", "run" are valid operations.
  * @param $text The text to run the condition over (ignored for "settings" operation)
  *
- * @return "prepare" and "process" operations return either TRUE or FALSE, "settings" returns an FAPI table
+ * @return "run" operation returns either TRUE or FALSE, "settings" returns an FAPI table
  */
 function flexifilter_invoke_condition($data, $op, $text = '') {
   // Blank class name is the faux condition "No Condition"
@@ -252,10 +252,7 @@ function flexifilter_invoke_condition($d
     case 'settings':
       return $return_value;
 
-    // For prepare and process, force the return value to TRUE or FALSE
-
-    case 'prepare':
-    case 'process':
+    case 'run':
       if ($return_value) {
         return TRUE;
       }
@@ -270,57 +267,23 @@ function flexifilter_invoke_condition($d
  *
  * @param $components An array containing components. Each value in this array must be an array with the following keys:
  *  - class : The name of a component class (i.e. one of the keys in the flexifilter_get_component_list() array)
- *  - step : If the component can run in either step, should contain "prepare" or "process". Ignored if the component runs in a set step.
  *  - settings : An array of settings for the component, suitable for passing to flexifilter_invoke_component()
- * @param $op The operation to perform on the components. Should be "prepare" or "process".
- * @param $text The text to prepare or process
+ * @param $text The text to process
  *
- * @return The new text, after preparation / processing
+ * @return The new text
  */
-function flexifilter_invoke_components($components, $op, $text) {
+function flexifilter_invoke_components($components, $text) {
   $component_list = flexifilter_get_component_list();
   foreach ($components as $key => $component) {
     if ($key !== 'id_prefix' && $key !== 'id_next') {
       $class = $component_list[$component['class']];
-      if ($class['step'] == 'both' || $component['settings']['step'] == $op || $class['step'] == $op) {
-        $text = flexifilter_invoke_component($class, $op, $component['settings'], $text);
-      }
+      $text = flexifilter_invoke_component($class, $op, $component['settings'], $text);
     }
   }
   return $text;
 }
 
 /**
- * API function that returns TRUE if the components are involved in the step.
- *
- * @param $components
- *   An array of components to check for involvement.
- * @param $step
- *   The step to check for involvement, either 'process' or 'prepare'.
- */
-function flexifilter_components_involve_step($components, $step) {
-  $component_list = flexifilter_get_component_list();
-  foreach ($components as $key => $component) {
-    if ($key !== 'id_prefix' && $key !== 'id_next') {
-      $class = $component_list[$component['class']];
-      // If step is explicity set to the one being tested, then it is involved
-      if ((isset($component['step']) && $component['step'] == $step) || $class['step'] == $step) {
-        return TRUE;
-      }
-      // If step is set to both, then it is involved (unless it is a container)
-      if ($class['is_container'] !== TRUE && $class['step'] == 'both') {
-        return TRUE;
-      }
-      // Finally, if one of its children is involed, then it is
-      if (isset($component['components']) && flexifilter_components_involve_step($component['components'], $step)) {
-        return TRUE;
-      }
-    }
-  }
-  return FALSE;
-}
-
-/**
  * Turns an array of elements into an array of groups containing element labels
  *
  * @param $elements An array of elements. Each key/value pair is an element, with the
@@ -363,10 +326,9 @@ function flexifilter_filter($op, $delta 
       $filter = flexifilter_get_filter_by_delta($delta);
       return $filter['description'];
 
-    case 'prepare':
     case 'process':
       $filter = flexifilter_get_filter_by_delta($delta);
-      return flexifilter_invoke_components($filter['components'], $op, $text);
+      return flexifilter_invoke_components($filter['components'], $text);
 
     default:
       return $text;
