diff --git a/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules.inc b/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules.inc
index 1fbc008..d0a345d 100644
--- a/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules.inc
+++ b/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules.inc
@@ -1,5 +1,5 @@
 <?php
 
 
 /**
@@ -28,6 +28,112 @@ function taxonomy_rules_event_info() {
 }
 
 /**
+ * Implementation of hook_rules_condition_info().
+ */
+function taxonomy_rules_condition_info() {
+  return array(
+    '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',
+    ),
+    'rules_condition_term_exists_on_node' => array(
+      'label' => t('Term exists on node'),
+      'arguments' => array(
+        'node' => array('type' => 'node', 'label' => t('Node')),
+      ),
+      'eval input' => array('term_exists|vocab_text', 'term_exists|term_text'),
+      'help' => t('Check whether a specific term exists on a node.'),
+      'module' => 'Taxonomy',
+    ),
+  );
+}
+
+/**
+ * A simple term comparison
+ */
+function rules_condition_term_comparison($term1, $term2) {
+  return $term1->tid == $term2->tid;
+}
+
+/**
+ * Condition Taxonomy: check existence of a term
+ */
+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;
+}
+
+/**
+ * Condition Taxonomy: check existence of a term on a specific node
+ */
+function rules_condition_term_exists_on_node($node, $settings) {
+
+  if (is_array($node->taxonomy) && !empty($node->taxonomy)) {
+  // 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;
+}
+
+/**
  * Returns some arguments suitable for using it with a term
  */
 function rules_events_hook_taxonomy_term_arguments($term_label, $update = FALSE) {
@@ -278,4 +384,4 @@ class rules_data_type_taxonomy_vocab extends rules_data_type {
 
 /**
  * @}
- */
+ */
\ No newline at end of file
diff --git a/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules_forms.inc b/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules_forms.inc
index 85badfd..6040936 100644
--- a/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules_forms.inc
+++ b/www/sites/all/modules/contributed/rules/rules/rules/modules/taxonomy.rules_forms.inc
@@ -1,5 +1,5 @@
 <?php
 
 
 /**
@@ -10,6 +10,76 @@
  */
 
 /**
+ * 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.'),
+  );
+}
+
+/**
+ * Condition Taxonomy: form to enter a term to check, if it exists on a node
+ */
+function rules_condition_term_exists_on_node_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 on the node. Remember that the case is ignored.'),
+  );
+}
+
+/**
  * Action: Load a term configuration form.
  *
  * Multistep form.
@@ -189,4 +259,4 @@ function _rules_action_taxonomy_get_vocab() {
 
 /**
  * @}
- */
+ */
\ No newline at end of file
-- 
1.6.5.1.1367.gcd48

