Index: htmlarea.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/htmlarea/htmlarea.module,v
retrieving revision 1.99
diff -u -r1.99 htmlarea.module
--- htmlarea.module 9 Apr 2006 23:03:43 -0000 1.99
+++ htmlarea.module 8 Oct 2006 02:47:13 -0000
@@ -120,15 +120,15 @@
* Implementation of hook_form_alter
*/
-function htmlarea_form_alter($form_id, &$form) {
+function htmlarea_form_alter($form_id, &$form, $parents = array()) {
global $htmlarea_init, $htmlarea_fields, $htmlarea_codeview;
foreach (element_children($form) as $key) {
switch ($form[$key]['#type']) {
case 'textarea':
$name = 'edit-';
- if ($form[$key]['#parent']) {
- $name.= implode('-', $form[$key]['#parent']) .'-';
+ if (count($parents)) {
+ $name.= implode('-', $parents) .'-';
}
$name.= $key;
$jsname = strtr($name, '- ', '_ ');
@@ -149,7 +149,9 @@
}
}
if (count(element_children($form[$key]))) {
- htmlarea_form_alter($form_id, $form[$key]);
+ $p = $parents;
+ $p[]= $key;
+ htmlarea_form_alter($form_id, $form[$key], $p);
}
}
}