Posted by smokris on September 24, 2008 at 12:46pm
3 followers
Jump to:
| Project: | Recent Changes |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
If I use recent_changes.module 5.x-1.2 and diff.module 5.x-2.1, I get a blank page when viewing the RSS feed, and the following in the Apache error logs:
PHP Fatal error: Call to undefined function _diff_table_body() in .../sites/all/modules/recent_changes/recent_changes.module on line 596_diff_table_body() was refactored in diff.module 5.x-2.x.
Here's a patch that solves the problem for me:
<?php
Index: recent_changes.module
===================================================================
--- recent_changes.module (revision 4397)
+++ recent_changes.module (working copy)
@@ -591,10 +591,17 @@
* Interface with the diff module. Returns a table with the differences between $node and $prev_revision
*/
function _recent_changes_get_diff($node, $prev_revision) {
- $item_text = '<table style="width:100%">';
- $item_text .= '<thead><tr><th></th><th>Revision of '. format_date($prev_revision->revision_timestamp) .'</th><th></th><th>Revision of '. format_date($node->revision_timestamp) .'</th></tr></thead>';
- $item_text .= _diff_table_body($prev_revision, $node);
- $item_text .= '</table>';
+ $header = array(
+ array(
+ 'data' => 'Revision as of '. format_date($prev_revision->revision_timestamp),
+ 'colspan' => 2
+ ),
+ array(
+ 'data' => 'Revision as of '. format_date($node->revision_timestamp),
+ 'colspan' => 2
+ )
+ );
+ $item_text .= theme('diff_table',$header,_diff_body_rows($prev_revision, $node));
// Replace css classes from diff with actual style elements since we cannot reference a css file from the rss feed.
$patterns = array(
?>
Comments
#1
Just adding a 'me too'.
#2
Also noting that the above patch fixed things for me.
#3
Not a problem in the 6.x version of this module.