The logic to determine which node types display inline differences when viewing a revision page only checks whether or not a given node type is in the variable array. (line 305)

if (user_access('view revisions') && in_array($node->type, variable_get('diff_show_diff_inline_node_bundles', array()))) {

This variable is controlled by the inline differences block configuration (which is extremely confusing). If you save the inline block configuration with it disabled (unchecked) for every content type, every content type still appears in the array, and the check will still evaluate to 'true' unless in_array() is using the strict option. (in_array() compares key values as well unless the strict option is enabled)
http://php.net/manual/en/function.in-array.php

Example:

array(
[page] => 0
[blog_entry] => 0
{slide] => 0
)

This means that the inline diff display will still override the display of individual revisions for 'disabled' content types.

Suggested edit:

if (user_access('view revisions') && in_array($node->type, variable_get('diff_show_diff_inline_node_bundles', array()), TRUE)) {

CommentFileSizeAuthor
#2 inline_node_bundles-2557287-2.patch690 bytesjastraat

Comments

jastraat created an issue. See original summary.

jastraat’s picture

Status: Active » Needs review
StatusFileSize
new690 bytes

  • Alan D. committed 3a03b6c on 7.x-3.x authored by jastraat
    Issue #2557287 by jastraat: Logic to show inline differences on certain...
alan d.’s picture

What a f'ken crazy PHP bug... That flag should compare types, but STRING != 0 in any world.

Thanks for reporting, pushed to 7.x branch and no longer applicable to 8.x

alan d.’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.