Révision b08d2851
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/flag/flag.rules.inc | ||
---|---|---|
221 | 221 |
'provides' => array( |
222 | 222 |
'overall_flag_count' => array( |
223 | 223 |
'label' => t('Overall flag count'), |
224 |
'description' => t('During a flagging/unflagging event the count |
|
225 |
will take into account the current flagging/unflagging procedure.'), |
|
224 | 226 |
'type' => 'integer', |
225 | 227 |
), |
226 | 228 |
), |
... | ... | |
245 | 247 |
'provides' => array( |
246 | 248 |
'entity_flag_count' => array( |
247 | 249 |
'label' => t('Entity flag count'), |
250 |
'description' => t('During a flagging event, the count |
|
251 |
will take into account the current flagging procedure. For |
|
252 |
an unflagging event, the count will NOT yet be decreased for the |
|
253 |
current unflagging procedure.'), |
|
248 | 254 |
'type' => 'integer', |
249 | 255 |
), |
250 | 256 |
), |
... | ... | |
267 | 273 |
'provides' => array( |
268 | 274 |
'user_flag_count' => array( |
269 | 275 |
'label' => t('User flag count'), |
276 |
'description' => t('During a flagging event, the count |
|
277 |
will take into account the current flagging procedure. For |
|
278 |
an unflagging event, the count will NOT yet be decreased for the |
|
279 |
current unflagging procedure.'), |
|
270 | 280 |
'type' => 'integer', |
271 | 281 |
), |
272 | 282 |
), |
... | ... | |
435 | 445 |
|
436 | 446 |
/** |
437 | 447 |
* Base action implementation: Fetch overall count for a particular flag. |
448 |
* |
|
449 |
* The count that is returned during a flagging or an unflagging will take into |
|
450 |
* account the current flag/unflag process. |
|
438 | 451 |
*/ |
439 | 452 |
function flag_rules_action_fetch_overall_flag_count($flag) { |
440 | 453 |
$count = flag_get_flag_counts($flag->name); |
... | ... | |
457 | 470 |
|
458 | 471 |
/** |
459 | 472 |
* Base action implementation: Fetch count of flags for a particular entity type. |
473 |
* |
|
474 |
* During a flagging, the current flagging will be included in the count. |
|
475 |
* During an unflagging, the current flagging being removed will not yet have |
|
476 |
* been removed from the count. |
|
460 | 477 |
*/ |
461 | 478 |
function flag_rules_action_fetch_entity_flag_count($flag, $entity_type) { |
462 | 479 |
$count = flag_get_entity_flag_counts($flag, $entity_type); |
... | ... | |
465 | 482 |
|
466 | 483 |
/** |
467 | 484 |
* Base action implementation: Fetch user's flag count. |
485 |
* |
|
486 |
* During a flagging, the current flagging will be included in the count. |
|
487 |
* During an unflagging, the current flagging will not yet have been removed |
|
488 |
* from the count. |
|
468 | 489 |
*/ |
469 | 490 |
function flag_rules_action_fetch_user_flag_count($flag, $user) { |
470 | 491 |
$count = flag_get_user_flag_counts($flag, $user); |
... | ... | |
497 | 518 |
'number' => array( |
498 | 519 |
'type' => 'integer', |
499 | 520 |
'label' => t('Number'), |
500 |
'description' => t('The number against which to test the number of times the object is flagged. For example, if you type "3" here, and choose "Greater than" for the operator, then this condition will return TRUE if the object is flagged more than three times.'), |
|
521 |
'description' => t('The number against which to test the number of |
|
522 |
times the object is flagged. For example, if you type "3" here, |
|
523 |
and choose "Greater than" for the operator, then this condition |
|
524 |
will return TRUE if the object is flagged more than three times. |
|
525 |
During a flagging or an unflagging event the count will take into |
|
526 |
account the current flag/unflag process.'), |
|
501 | 527 |
), |
502 | 528 |
'operator' => array( |
503 | 529 |
'type' => 'text', |
... | ... | |
554 | 580 |
|
555 | 581 |
/** |
556 | 582 |
* Condition: Check flagging count. |
583 |
* |
|
584 |
* The count that is returned during a flagging or an unflagging will take into |
|
585 |
* acount the current flag/unflag process. |
|
557 | 586 |
*/ |
558 | 587 |
function flag_rules_condition_threshold($flag, $entity, $number, $operator = '=') { |
559 | 588 |
$count = $flag->get_count($flag->get_entity_id($entity)); |
Formats disponibles : Unified diff
Weekly update of contrib modules