summaryrefslogtreecommitdiff
path: root/modules/upload.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload.module')
-rw-r--r--modules/upload.module6
1 files changed, 3 insertions, 3 deletions
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')),
);
}