changeset 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 b4c1e3d5d5ce
children e3f85c9247b7
files noderef_view.module
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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;
     }
   }