From c647b39c2c67c09ac421e43fedd4cdfa1a29b984 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 27 Nov 2005 11:11:46 +0000 Subject: - Patch #37798 by Neil: fixed problem with node settings. --- modules/upload.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/upload.module') diff --git a/modules/upload.module b/modules/upload.module index 50a4c0861..195e9d677 100644 --- a/modules/upload.module +++ b/modules/upload.module @@ -144,9 +144,9 @@ function upload_file_download($file) { } function upload_form_alter($form_id, &$form) { - if (substr($form_id, -14) == '_node_settings') { - $form['workflow']['upload_'. $node->type] = array( - '#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $node->type, 1), + if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) { + $form['workflow']['upload_'. $form['type']['#value']] = array( + '#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $form['type']['#value'], 1), '#options' => array(t('Disabled'), t('Enabled')), ); } -- cgit v1.2.3