upadted feedback module
didn't repatched it for email notification since rules hooks semmes to be added to the module added the old patch for memory
This commit is contained in:
55
sites/all/modules/contrib/users/feedback/feedback.rules.inc
Normal file
55
sites/all/modules/contrib/users/feedback/feedback.rules.inc
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Rules integration for feedback.
|
||||
*
|
||||
* @addtogroup rules
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_rules_event_info().
|
||||
*/
|
||||
function feedback_rules_event_info() {
|
||||
$defaults = array(
|
||||
'group' => t('Feedback'),
|
||||
'module' => 'feedback',
|
||||
'access callback' => 'feedback_rules_integration_access',
|
||||
);
|
||||
return array(
|
||||
'feedback_insert' => $defaults + array(
|
||||
'label' => t('After saving new feedback'),
|
||||
'variables' => array(
|
||||
'feedback' => array('type' => 'feedback', 'label' => t('Feedback message')),
|
||||
),
|
||||
),
|
||||
'feedback_update' => $defaults + array(
|
||||
'label' => t('After saving existing feedback'),
|
||||
'variables' => array(
|
||||
'feedback' => array(
|
||||
'type' => 'feedback',
|
||||
'label' => t('Feedback message'),
|
||||
),
|
||||
'feedback_unchanged' => array(
|
||||
'type' => 'feedback',
|
||||
'label' => t('unchanged feedback entity'),
|
||||
'handler' => 'rules_events_entity_unchanged',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rules integration access callback.
|
||||
*/
|
||||
function feedback_rules_integration_access($type, $name) {
|
||||
if ($type == 'event' || $type == 'condition') {
|
||||
return entity_access('view', 'feedback');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
Reference in New Issue
Block a user