/[drupal]/contributions/modules/flag/includes/flag.rules.inc
ViewVC logotype

Diff of /contributions/modules/flag/includes/flag.rules.inc

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

revision 1.1.2.2.2.1, Sun Sep 13 22:37:37 2009 UTC revision 1.1.2.2.2.2, Tue Nov 3 01:53:36 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flag.rules.inc,v 1.1.2.2 2009/05/06 23:37:47 quicksketch Exp $  // $Id: flag.rules.inc,v 1.1.2.2.2.1 2009/09/13 22:37:37 quicksketch Exp $
3    
4  /**  /**
5   * @file flag.rules.inc   * @file flag.rules.inc
# Line 45  class flag_rules_data_type extends rules Line 45  class flag_rules_data_type extends rules
45    }    }
46    
47    /**    /**
48     * Returns radios for selecting a flag of the type given in     * Returns radios for selecting a flag of the type given in
49     * $info['flag_type'].     * $info['flag_type'].
50     */     */
51    function get_default_input_form($info, $value) {    function get_default_input_form($info, $value) {
# Line 82  function flag_rules_event_info() { Line 82  function flag_rules_event_info() {
82    
83    $flags = flag_get_flags();    $flags = flag_get_flags();
84    foreach ($flags as $flag) {    foreach ($flags as $flag) {
85    
86      $arguments = array(      $arguments = array(
87        // First, define ubiquitous arguments.        // First, define ubiquitous arguments.
88        'flag' => array(        'flag' => array(
# Line 165  function flag_rules_action_info() { Line 165  function flag_rules_action_info() {
165      $flag = flag_create_handler($type);      $flag = flag_create_handler($type);
166      if ($flag->rules_get_element_argument_definition()) {      if ($flag->rules_get_element_argument_definition()) {
167        $args += array('object' => $flag->rules_get_element_argument_definition());        $args += array('object' => $flag->rules_get_element_argument_definition());
168    
169        $items += array(        $items += array(
170          'flag_rules_action_flag_'. $type => array(          'flag_rules_action_flag_'. $type => array(
171            'label' => t('Flag a @type', array('@type' => $type)),            'label' => t('Flag a @type', array('@type' => $type)),
# Line 217  function flag_rules_action_unflag($flag, Line 217  function flag_rules_action_unflag($flag,
217   * Base action implementation: Trim flag.   * Base action implementation: Trim flag.
218   */   */
219  function flag_rules_action_trim($flag, $flagging_user, $cutoff_size, $settings) {  function flag_rules_action_trim($flag, $flagging_user, $cutoff_size, $settings) {
220    flag_trim_flag($flag, $flagging_user->uid, $cutoff_size);    flag_trim_flag($flag, $flagging_user, $cutoff_size);
221  }  }
222    
223  /**  /**
# Line 236  function flag_rules_condition_info() { Line 236  function flag_rules_condition_info() {
236      $flag = flag_create_handler($type);      $flag = flag_create_handler($type);
237      if ($flag->rules_get_element_argument_definition()) {      if ($flag->rules_get_element_argument_definition()) {
238        $args += array('object' => $flag->rules_get_element_argument_definition());        $args += array('object' => $flag->rules_get_element_argument_definition());
239    
240        $items += array(        $items += array(
241          'flag_rules_condition_threshold_'. $type => array(          'flag_rules_condition_threshold_'. $type => array(
242            'label' => drupal_ucfirst(t('@type has flagging count', array('@type' => $type))),            'label' => drupal_ucfirst(t('@type has flagging count', array('@type' => $type))),

Legend:
Removed from v.1.1.2.2.2.1  
changed lines
  Added in v.1.1.2.2.2.2

  ViewVC Help
Powered by ViewVC 1.1.2