I wanted to make sure that the Revisioning sublinks would only show if I had enabled revisions to that particular content type, so I wrote this tiny patch to do that. I hope others might find it useful.

It looks like a lot of code changes when you first glance at the patch, but really it's just a new "if" statement with the existing code indented so that it fits inside of the "if" statement.

CommentFileSizeAuthor
revisioning_sublinks_2.5.patch3.99 KBattheshow

Comments

redndahead’s picture

Status: Active » Needs review

Moving to CNR

attheshow’s picture

I should probably also note here that in my setup, I've commented out the "Edit" tab-blocking code in revisioning.module.

  // Remove "Edit" as a tab and redirect existing edit links to
  // _show_node_revisions() to ensure user picks desired revision first.
  //$items['node/%node/edit']['page callback'] = '_show_node_revisions';
//$items['node/%node/edit']['page arguments'] = array(1);
  //$items['node/%node/edit']['type'] = MENU_CALLBACK;

I basically did this because I have the same problem mentioned in issue: #416998: Revisioning takes over all "Edit" in all content

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Needs review » Needs work

Hi attheshow,
Thanks for the patch!
As you remarked yourself, this thread is now gravitating towards and partly overlapping with #416998: Revisioning takes over all "Edit" in all content .
If you don't mind, I may mark this as a duplicate, as the work I have in mind for that issue, will include what is required for this one.
It will involve not merely suppressing the links from view, but also make sure that the user cannot mischievously construct a URL to still do what we don't want them to do. Otherwise we would have a security hole.
Rik

rdeboer’s picture

Status: Needs work » Fixed

First cut to alleviate this is available in development snapshot(s) of 11-Jun-09 or later.
Please don't forget to also upgrade Module Grants and to visit Site building>>Modules to activate the changes.

rdeboer’s picture

Status: Fixed » Closed (fixed)