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)) {
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | inline_node_bundles-2557287-2.patch | 690 bytes | jastraat |
Comments
Comment #2
jastraat commentedComment #4
alan d. commentedWhat 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
Comment #5
alan d. commented