[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/rules/rules_test/ -> rules_test.module (source)

   1  <?php
   2  // $Id: rules_test.module,v 1.1.2.4 2009/04/19 15:03:43 fago Exp $
   3  
   4  
   5  /**
   6   * @file Rules engine testing module
   7   */
   8  
   9  /**
  10   * Returns the log and clears it afterwards
  11   */
  12  function rules_test_show_log(&$error) {
  13    global $_rules_log;
  14  
  15    if (is_array($_rules_log) && count($_rules_log)) {
  16      $i = 0;
  17      $msg = _rules_show_log($i, $_rules_log, $error);
  18      $_rules_log = NULL;
  19  
  20      return $msg;
  21    }
  22    return FALSE;
  23  }
  24  
  25  /**
  26   * Makes sure the rules engine doesn't clean up the log, so that we can access it
  27   */
  28  function rules_test_keep_rules_log() {
  29    global $_rules_exec_log;
  30  
  31    if (!isset($_rules_exec_log)) {
  32      $_rules_exec_log = array();
  33    }
  34    $_rules_exec_log['rules_test_keep_log'] = 'rules_test_keep_log';
  35  }
  36  
  37  /**
  38   * Cleans up
  39   */
  40  function rules_test_done() {
  41    global $_rules_exec_log;
  42  
  43    if (isset($_rules_exec_log)) {
  44      unset($_rules_exec_log['rules_test_keep_log']);
  45    }
  46  }
  47  


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7