Revision list menu_alter doesn't check for the appropriate variable
duozersk - August 20, 2009 - 11:19
| Project: | Revision Deletion |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | NancyDru |
| Status: | closed |
Jump to:
Description
The module just overrides the Revisions list for every node, doesn't respect its own settings.
I believe that the function "revision_deletion_menu_alter" in the "revision_deletion.module" should check for the "revision_delete_list_takeover" variable.
I've changed it like this:
function revision_deletion_menu_alter(&$items) {
if (variable_get('revision_delete_list_takeover', 0)) {
$items['node/%node/revisions']['page callback'] = 'revision_deletion_list';
$items['node/%node/revisions']['file'] = 'revision_deletion.module';
$items['node/%node/revisions']['access_callback'] = '_revision_deletion_access';
$items['node/%node/revisions']['module'] = 'revision_deletion';
}
}Don't know how to submit patches. Anyway, if this is the appropriate fix - then please submit it.

#1
Thank you for catching this. On my test site I have all content types enabled, so I expected to see it. Plus this is really an outgrowth of the "list revisions" page. I believe that it also doesn't respect the content type settings, so I will look at both.
#2
Committed to 6.x-1.x-dev.
#3
Included in the -rc1 versions.