Révision ae34fb26
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/content_access/content_access_rules/content_access_rules.rules.inc | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
function content_access_rules_rules_event_info() { |
19 | 19 |
$events['content_access_content_type'] = array('label' => t('Content type access control was changed')); |
20 |
$events['content_access_per_node'] = array('label' => t('Per node access control was changed')); |
|
20 |
$events['content_access_per_node'] = array( |
|
21 |
'label' => t('Per node access control was changed'), |
|
22 |
'variables' => array( |
|
23 |
'node' => array('type' => 'node', 'label' => 'Content with updated content access'), |
|
24 |
), |
|
25 |
); |
|
21 | 26 |
|
22 | 27 |
if (module_exists('acl')) { |
23 | 28 |
$events['content_access_user_acl'] = array('label' => t('User was added to ACL')); |
... | ... | |
25 | 30 |
|
26 | 31 |
$items = array(); |
27 | 32 |
foreach ($events as $name => $event) { |
28 |
$items[$name] = array( |
|
29 |
'label' => $event['label'], |
|
33 |
$items[$name] = $event + array( |
|
30 | 34 |
'group' => t('Content Access'), |
31 | 35 |
); |
32 | 36 |
} |
... | ... | |
390 | 394 |
// node_save() does implement node_access_acquire_grants() so we don't want |
391 | 395 |
// to execute it again or we'll get a duplicated key exception |
392 | 396 |
if (!isset($node->op) || |
393 |
(isset($node->op) && $node->op != 'Save')) {
|
|
397 |
(isset($node->op) && $node->op != t('Save'))) {
|
|
394 | 398 |
node_access_acquire_grants($node); |
395 | 399 |
} |
396 |
} |
|
400 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules