2d1
< // $Id: ruleset.action.inc,v 1.1.2.2 2009/05/10 02:48:35 kratib Exp $
8c7,12
<     if (count($ruleset['arguments']) == 1) { // For now, we only accept rulesets with one parameter (taken to be the 'type')
---
>     
>     
>     
>     
>      
>     if (count($ruleset['arguments']) <= 1) { // For now, we only accept rulesets with one parameter (taken to be the 'type')
10c14,17
<       $actions["views_bulk_operations_ruleset_action_{$ruleset_key}"] = array(
---
> 	 // $arg1 = key(current($ruleset['arguments']));
>     //  $arg2 = key(next($ruleset['arguments']));
>       
> 	  $actions["views_bulk_operations_ruleset_action_{$ruleset_key}"] = array(
25a33,57
>     
>     if (count($ruleset['arguments']) == 2) { 
> 
>       $arg = key($ruleset['arguments']);
>       $arg2=next($ruleset["arguments"]);
>       if($arg2['type']=='user'){
>      
>         $actions["views_bulk_operations_ruleset_action_{$ruleset_key}"] = array(
>           'type' => $ruleset['arguments'][$arg]['type'],
>           'parameters' => array('ruleset' => $ruleset_key),
>           'description' => $ruleset['label'],
>           'configurable' => FALSE,
>           'rules_ignore' => TRUE,
>         );
>         eval(<<<EOS
>         if (!function_exists('views_bulk_operations_ruleset_action_{$ruleset_key}')) {
>           function views_bulk_operations_ruleset_action_{$ruleset_key}(&\$object, \$context) {
>             global \$user;
>             rules_invoke_rule_set(\$context['ruleset'], \$object,\$user);
>           }
>         }
> EOS
>         );
>       }
>     }
