--- token.rules.inc	2010-06-09 06:18:56.000000000 +0530
+++ token.rules.inc	2010-12-30 01:45:07.625000000 +0530
@@ -54,15 +54,30 @@ function token_rules_input_evaluator_pre
 function token_rules_input_evaluator_apply($text, $used_vars, &$state) {
   static $token_cache = array();
 
-  if ($used_vars) {
-    $vars = rules_get_variables(drupal_map_assoc($used_vars), $state);
-    if (!$vars) {
+  if ($used_vars || strpos($text, TOKEN_PREFIX. 'global' .':') !== FALSE) {
+    if ($used_vars) {
+      $vars = rules_get_variables(drupal_map_assoc($used_vars), $state);
+     }
+     
+     if (!$vars && strpos($text, TOKEN_PREFIX. 'global' .':') === FALSE) {
       //there not all needed variables available!
       return FALSE;
     }
+    
+    if (strpos($text, TOKEN_PREFIX. 'global' .':') !== FALSE) {
+      $used_vars[] = 'global';
+    }
 
     foreach ($used_vars as $name) {
+    
+      if ($name != 'global'){ 
       $type = _token_rules_map_type($state['variables'][$name]->info['type']);
+      }
+      else {
+      $type = 'global';
+      $vars['global'] = 'global';
+      }
+      
       if ($type) {
         $token_id = _token_get_id($type, $vars[$name]);
         if (isset($token_cache[$token_id]) && $token_cache[$token_id] != $name) {
@@ -96,7 +111,8 @@ function _token_rules_map_type($type) {
  * Some token replacement help for the condition/action edit form.
  */
 function token_rules_input_evaluator_help($variables) {
-
+  $variables['global'] = array('type' => 'global', 'label' => 'global token',);
+  
   foreach ($variables as $name => $info) {
     $type = _token_rules_map_type($info['type']);
     if ($type) {
@@ -112,4 +128,4 @@ function token_rules_input_evaluator_hel
     }
   }
   return $form;
-}
+}
\ No newline at end of file
