Compatibility with Storm module
This commit is contained in:
parent
a75b93d701
commit
e54437b797
1 changed files with 11 additions and 2 deletions
|
@ -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';
|
||||
|
|
Reference in a new issue