Compatibility with Storm module

This commit is contained in:
Manuel Cillero 2017-07-26 14:31:06 +02:00
parent a75b93d701
commit e54437b797

View file

@ -11,7 +11,16 @@ function view_revisions_by_content_type_perm() {
$perms = array();
foreach (node_get_types() as $type) {
if ($type->module == 'node' || $type->module == 'features') {
if ($type->module == 'node' || $type->module == 'features' ||
$type->module == 'stormproject' ||
$type->module == 'stormtask' ||
$type->module == 'stormticket' ||
$type->module == 'stormevent' ||
$type->module == 'stormdok' ||
$type->module == 'stormnote'
) {
$name = check_plain($type->type);
$perms[] = 'view revisions of '. $name .' content';
}
@ -32,7 +41,7 @@ function view_revisions_by_content_type_menu_alter(&$items) {
'node/%node/revisions/view/%/%',
);
// Override the access callback for each of the
// Override the access callback for each of the
foreach ($items as $path => $item) {
if (in_array($path, $view_revision_menu_items_paths)) {
$items[$path]['access callback'] = 'view_revisions_by_content_type_access';