# HG changeset patch # User Franck Deroche # Date 1232545182 -3600 # Node ID 98642e828c60e9fbf58ab9f5a03fa4f766b49e54 # Parent 92ed2a6293365bbaa8c08b3889bdfd9066a8afe2 Don't take over #prefix / #suffix if previously defined. This broke the "Add more" fonctionnality of CCK. Being E_STRICT compliant makes the code quite verbose though :-/ diff -r 92ed2a629336 -r 98642e828c60 popups_reference.module --- a/popups_reference.module Wed Jan 21 14:17:45 2009 +0100 +++ b/popups_reference.module Wed Jan 21 14:39:42 2009 +0100 @@ -92,8 +92,20 @@ if ($links) { // Put the nodereference widget and links in an wrapper. // Makes it easy to find for Ahah targeting, and popups_reference behavior selecting. - $form[$key]['#prefix'] = '
'; - $form[$key]['#suffix'] = '
Add New: ' . implode(', ', $links) .'
'; + $prefix = '
'; + if (isset($form[$key]['#prefix'])) { + $form[$key]['#prefix'] .= $prefix; + } + else { + $form[$key]['#prefix'] = $prefix; + } + $suffix = '
Add New: ' . implode(', ', $links) .'
'; + if (isset($form[$key]['#suffix'])) { + $form[$key]['#suffix'] = $suffix . $form[$key]['#suffix']; + } + else { + $form[$key]['#suffix'] = $suffix; + } } } }