diff -dur /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/rules.rules.inc ./rules/modules/rules.rules.inc
--- /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/rules.rules.inc	2011-01-22 21:19:46.307720111 -0800
+++ ./rules/modules/rules.rules.inc	2011-01-05 05:59:43.000000000 -0800
@@ -172,9 +172,7 @@
  */
 function rules_condition_text_compare($text1, $text2, $settings) {
   if ($settings['regex']) {
-    //{m2osw
-    return (bool) preg_match('/'. str_replace('/', '\\/', $text2) .'/', $text1);
-    //m2osw}
+    return (bool) preg_match('/'. $text2 .'/', $text1);
   }
   return $text1 == $text2;
 }
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules: .svn
diff -dur /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/taxonomy.rules_forms.inc ./rules/modules/taxonomy.rules_forms.inc
--- /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/taxonomy.rules_forms.inc	2011-01-22 21:40:17.647252426 -0800
+++ ./rules/modules/taxonomy.rules_forms.inc	2009-09-10 03:57:54.000000000 -0700
@@ -9,115 +9,6 @@
  * @{
  */
 
-//{m2osw
-/**
- * Condition Taxonomy: form to enter a term to check
- */
-function rules_condition_term_exists_form($settings, &$form) {
-  $form['settings']['term_exists'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Vocabulary and term definition'),
-  );
-  $options = _rules_action_taxonomy_get_vocab();
-  $options[0] = t('None');
-  $form['settings']['term_exists']['vocab_select'] = array(
-    '#type' => 'select',
-    '#title' => t('Select a vocabulary'),
-    '#options' => $options,
-    '#default_value' => !empty($settings['term_exists']['vocab_select']) ? $settings['term_exists']['vocab_select'] : '',
-    '#description' => t('Select None if any term from any vocabulary is acceptable. Otherwise select the exact vocabulary.'),
-    '#required' => TRUE,
-    '#disabled' => empty($options),
-  );
-  $form['settings']['term_exists']['vocab_text'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Select by vocabulary id'),
-    '#default_value' => !empty($settings['term_exists']['vocab_text']) ? $settings['term_exists']['vocab_text'] : '',
-    '#disabled' => empty($options),
-    '#description' => t('Optional: Enter the vocabulary id (<em>not the vocabulary name</em>) that should be loaded. If this field is used, the "Select a vocabulary" field will be ignored.'),
-  );
-  $form['settings']['term_exists']['term_text'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Enter the name of the term'),
-    '#default_value' => !empty($settings['term_exists']['term_text']) ? $settings['term_exists']['term_text'] : '',
-    '#disabled' => empty($options),
-    '#description' => t('Enter the name of the term to search for. Remember that the case is ignored.'),
-  );
-}
-
-/**
- * Action: Create a new term configuration form.
- *
- * @see rules_action_taxonomy_add_term2_submit().
- */
-function rules_action_taxonomy_add_term2_form($settings, &$form, $form_state) {
-  $settings += array('vocabulary' => 0);
-  if (empty($settings['vocabulary'])) {
-    // Get existing taxonomy vocabularies.
-    $options = _rules_action_taxonomy_get_vocab();
-    $form['settings']['vocabulary'] = array(
-      '#type' => 'select',
-      '#title' => t('Vocabulary'),
-      '#options' => $options,
-      '#description' => !empty($options) ? t('Select the vocabulary where the term will be added.') : t('There are no existing vocabularies, you should <a href="@add-url">add</a> one.', array('@add-url' => url('/admin/content/taxonomy/add/vocabulary'))),
-      '#required' => TRUE,
-      '#disabled' => empty($options),
-    );
-
-    // Hide some form elements in the first step.
-    $form['new']['#access'] = FALSE;
-    $form['input_help']['#access'] = FALSE;
-    $form['weight']['#access'] = FALSE;
-
-    // Replace the usual submit handlers with our own handler.
-    $form['submit']['#submit'] = array('rules_action_taxonomy_add_term2_form_step_submit');
-    $form['submit']['#value'] = t('Continue');
-  }
-  else {
-    module_load_include('inc', 'taxonomy', 'taxonomy.admin');
-    $form['settings']['term'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Term settings'),
-    );
-
-    $vocabulary = taxonomy_vocabulary_load($settings['vocabulary']);
-    $form['settings']['term']['info'] = array(
-      '#value' => t('Define the term to add to vocabulary !vocab', array('!vocab' => $vocabulary->name)),
-    );
-
-    $form['settings']['term']['term_add'] = taxonomy_form_term($form_state, $vocabulary, !empty($settings['term']) ? $settings['term'] : array());
-
-    // Remove the 'Save' button.
-    unset($form['settings']['term']['term_add']['submit']);
-  }
-}
-
-function rules_action_taxonomy_add_term2_form_step_submit($form, &$form_state) {
-  $form_state['element']['#settings']['vocabulary'] = $form_state['values']['settings']['vocabulary'];
-}
-
-/**
- * Action: Create a new term submit handler.
- *
- * Flatten the term settings so they can be passed back to
- * taxonomy_form_term().
- */
-function rules_action_taxonomy_add_term2_submit(&$settings, $form, $form_state) {
-  if (!empty($settings['term'])) {
-    $term_add = $settings['term']['term_add'];
-    unset($settings['term']['term_add']);
-    foreach ($term_add as $key => $values) {
-      if (is_array($values)) {
-        $settings['term'] += $values;
-      }
-      else {
-        $settings['term'][$key] = $values;
-      }
-    }
-  }
-}
-//m2osw}
-
 /**
  * Action: Load a term configuration form.
  *
@@ -166,9 +57,7 @@
       '#title' => t('Select by term id'),
       '#default_value' => !empty($settings['term']['term_text']) ? $settings['term']['term_text'] : '',
       '#disabled' => empty($options),
-      //{m2osw
-      '#description' => t('Optional: enter the term id, or the term name preceded by <strong>name:</strong> that should be loaded . If this field is used "Select a term" field will be ignored.'),
-      //m2osw}
+      '#description' => t('Optional: enter the term id (<em>not the term name</em>) that should be loaded . If this field is used "Select a term" field will be ignored.'),
     );
   }
 }
diff -dur /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/taxonomy.rules.inc ./rules/modules/taxonomy.rules.inc
--- /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules/taxonomy.rules.inc	2011-01-22 21:42:30.565127099 -0800
+++ ./rules/modules/taxonomy.rules.inc	2011-01-22 21:38:08.564551271 -0800
@@ -27,78 +27,6 @@
   );
 }
 
-//{m2osw
-/**
- * Implementation of hook_rules_condition_info().
- */
-function taxonomy_rules_condition_info() {
-  return array(
-    // I suppose this cannot be achieved yet...
-    // It could be used to compare the parent of two distinct terms...
-    'rules_condition_term_comparison' => array(
-      'label' => t('Compare two terms'),
-      'arguments' => array(
-        'term1' => array(
-          'type' => 'taxonomy_term',
-          'label' => t('Term 1')
-        ),
-        'term2' => array(
-          'type' => 'taxonomy_term',
-          'label' => t('Term 2')
-        ),
-      ),
-      'help' => t('Evaluates to TRUE when both terms are the same.'),
-      'module' => 'Taxonomy',
-    ),
-    'rules_condition_term_exists' => array(
-      'label' => t('Term exists'),
-      'eval input' => array('term_exists|vocab_text', 'term_exists|term_text'),
-      'help' => t('Check whether the specified term exists.'),
-      'module' => 'Taxonomy',
-    ),
-  );
-}
-
-/**
- * A simple user comparison
- */
-function rules_condition_term_comparison($term1, $term2) {
-  return $term1->tid == $term2->tid;
-}
-
-/**
- * Condition user: condition to check whether a term exists
- */
-function rules_condition_term_exists($settings) {
-  // TODO: add support for named vocabularies
-  if ($settings['vocabulary']['vocab_text'] == 'any') {
-    $vid = 0;
-  }
-  else if (!empty($settings['vocabulary']['vocab_text'])) {
-    $vid = $settings['vocabulary']['vocab_text'];
-  }
-  else {
-    $vid = $settings['vocabulary']['vocab_select'];
-  }
-
-  $term_text = $settings['term_exists']['term_text'];
-  $terms = taxonomy_get_term_by_name($term_text);
-
-  if (!$vid) {
-    // term of any vocabulary is a match
-    return count($terms) > 0;
-  }
-
-  foreach ($terms as $term) {
-    if ($term->vid == $vid) {
-      return TRUE;
-    }
-  }
-
-  return FALSE;
-}
-//m2osw}
-
 /**
  * Returns some arguments suitable for using it with a term
  */
@@ -163,20 +91,6 @@
     'eval input' => array('term|name', 'term|description'),
     'module' => 'Taxonomy',
   );
-  //{m2osw
-  $info['rules_action_taxonomy_add_term2'] = array(
-    'label' => t('Add a new term (fixed vocabulary)'),
-    'new variables' => array(
-      'taxonomy_term' => array(
-        'type' => 'taxonomy_term',
-        'label' => t('Taxonomy term'),
-      ),
-    ),
-    'eval input' => array('term|name', 'term|description', 'term|synonyms'),
-    'help' => t('Create a new term in the specified vocabulary. The term can be acted on afterward (i.e. to add a parent term.)'),
-    'module' => 'Taxonomy',
-  );
-  //m2osw}
 
   $info['rules_action_taxonomy_delete_term'] = array(
     'label' => t('Delete a term'),
@@ -189,24 +103,6 @@
     'module' => 'Taxonomy',
   );
 
-  //{m2osw
-  $info['rules_action_taxonomy_assign_parent_term'] = array(
-    'label' => t('Assign a parent term to a term'),
-    'arguments' => array(
-      'taxonomy_term_parent' => array(
-        'type' => 'taxonomy_term',
-        'label' => t('Parent term'),
-      ),
-      'taxonomy_term_child' => array(
-        'type' => 'taxonomy_term',
-        'label' => t('Child term'),
-      ),
-    ),
-    'help' => t('Use two terms and make one the parent of the other. The terms must be previously loaded or added.'),
-    'module' => 'Taxonomy',
-  );
-  //m2osw}
-
   $info['rules_action_taxonomy_term_assign_to_content'] = array(
     'label' => t('Assign a term to content'),
     'arguments' => array(
@@ -266,21 +162,9 @@
  * Action: Load a term.
  */
 function rules_action_taxonomy_load_term($settings) {
-  //{m2osw
-  $term_text = $settings['term']['term_text'];
-  if ($term_text && substr($term_text, 0, 5) == "name:") {
-    $terms = taxonomy_get_term_by_name(substr($term_text, 5));
-    foreach ($terms as $term) {
-      if ($term->vid == $settings['vocabulary']) {
-        return array('taxonomy_term' => $term);
-      }
-    }
-    // did not work...
-  }
-  else if ($term = taxonomy_get_term(!empty($term_text) ? $term_text : $settings['term']['term_select'])) {
+  if ($term = taxonomy_get_term(!empty($settings['term']['term_text']) ? $settings['term']['term_text'] : $settings['term']['term_select'])) {
     return array('taxonomy_term' => $term);
   }
-  //m2osw}
 }
 
 /**
@@ -296,18 +180,6 @@
   return array('taxonomy_term' => $term);
 }
 
-//{m2osw
-/**
- * Action: Add a term.
- */
-function rules_action_taxonomy_add_term2($settings) {
-  $form_values = $settings['term'];
-  taxonomy_save_term($form_values);
-  $settings['term']['tid'] = $form_values['tid']; // Necessary?
-  return array('taxonomy_term' => taxonomy_get_term($form_values['tid']));
-}
-//m2osw}
-
 /**
  * Action: Delete a term.
  */
@@ -315,19 +187,6 @@
   taxonomy_del_term($taxonomy_term->tid);
 }
 
-//{m2osw
-/**
- * Action: Assign a term as the parent of another term.
- */
-function rules_action_taxonomy_assign_parent_term($taxonomy_term_parent, $taxonomy_term_child, $settings) {
-  $sql = "DELETE FROM {term_hierarchy} WHERE tid = %d AND parent = 0";
-  db_query($sql, $taxonomy_term_child->tid);
-  $sql = "INSERT INTO {term_hierarchy} (tid, parent) VALUES (%d, %d)";
-  db_query($sql, $taxonomy_term_child->tid, $taxonomy_term_parent->tid);
-  return array('taxonomy_term_child' => $taxonomy_term_child);
-}
-//m2osw}
-
 /**
  * Action: Assign or remove a term to content.
  */
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/modules: .taxonomy.rules.inc.swp
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules/translations: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_admin/icons: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_admin: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_admin/translations: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_scheduler: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_scheduler/translations: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_test: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules/rules_test/translations: .svn
Only in /home/alexis/m2osw/sources/www/m2osw/drupal/new.m2osw.com/public_html/sites/all/modules/rules: .svn
