/[drupal]/contributions/modules/userpoints/userpoints_rules.rules.inc
ViewVC logotype

Diff of /contributions/modules/userpoints/userpoints_rules.rules.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Tue Aug 11 15:40:49 2009 UTC revision 1.1.2.1, Sun Sep 13 02:47:01 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: userpoints_rules.rules.inc,v 1.1 2009/08/11 15:40:49 kbahey Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 41  function userpoints_rules_event_info() { Line 41  function userpoints_rules_event_info() {
41  /**  /**
42   * Rules action - grant points to a user.   * Rules action - grant points to a user.
43   */   */
44  function userpoints_action_grant_points($account_uid, $settings) {  function userpoints_action_grant_points($account, $settings) {
45      userpoints_userpointsapi(array('uid' => $account_uid, 'points' => $settings['points']));    userpoints_userpointsapi(array('uid' => $account->uid, 'points' => $settings['points']));
46  }  }
47    
48  /**  /**
# Line 101  function userpoints_rules_amount_form($s Line 101  function userpoints_rules_amount_form($s
101  /**  /**
102   * Rules Condition - Userpoints amount is >= than   * Rules Condition - Userpoints amount is >= than
103   */   */
104  function userpoints_rules_amount($account_uid, $settings) {  function userpoints_rules_amount($account, $settings) {
105    $balance = userpoints_get_current_points($account_uid, $settings['type']);    $balance = userpoints_get_current_points($account->uid, $settings['type']);
106  return ($balance >= $settings['amount']);  return ($balance >= $settings['amount']);
107  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2