Mercurial > defr > drupal > noderef_view
diff noderef_view.module @ 5:4fc2f22efcdf
Better name for the attribute to prevent collision, add to #after_build
#link was probably overly too broad, so I've renamed the attribute to include
the module name.
The code previously also fully took over #after_build, which killed other
modules registrations. Now the module's a good citizen and only add its
handler leaving the others as is.
author | Franck Deroche <franck@defr.org> |
---|---|
date | Mon, 26 Jan 2009 14:59:57 +0100 |
parents | 9372c6448311 |
children | e3f85c9247b7 |
line wrap: on
line diff
--- a/noderef_view.module Mon Jan 26 12:29:17 2009 +0100 +++ b/noderef_view.module Mon Jan 26 14:59:57 2009 +0100 @@ -112,8 +112,8 @@ if (is_array($field) && $field['type'] == 'nodereference') { $link = _noderef_view_get_link($field); if (!empty($link)) { - $form[$key]['#links'] = $link; - $form[$key]['#after_build'] = array('noderef_view_add_link'); + $form[$key]['#noderef_view_link'] = $link; + $form[$key]['#after_build'][] = 'noderef_view_add_link'; return TRUE; } }