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
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

NancyDru - August 20, 2009 - 19:48
Assigned to:Anonymous» NancyDru

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

NancyDru - August 22, 2009 - 00:36
Title:Revision list form alter doesn't check for the appropriate variable» Revision list menu_alter doesn't check for the appropriate variable
Status:active» fixed

Committed to 6.x-1.x-dev.

#3

NancyDru - August 31, 2009 - 18:35
Status:fixed» closed

Included in the -rc1 versions.

 
 

Drupal is a registered trademark of Dries Buytaert.