Index: tw_tablebuild.inc =================================================================== --- tw_tablebuild.inc (revision 2820) +++ tw_tablebuild.inc (working copy) @@ -202,6 +202,15 @@ ); } } + + // Give modules a chance to alter $tables. This is hook_tw_relationship_alter(). + // We cannot use module_invoke() for this, because the table arguments need to be passed by reference. + foreach (module_list() as $module) { + $function = $module .'_tw_relationship_alter'; + if (function_exists($function)) { + $function($tables[$rawtbl1], $tables[$rawtbl2], $row); + } + } } return $tables;