Commit 8050af67 authored by Steven Wittens's avatar Steven Wittens

Setting the default workflow for attachments by upload.module to be enabled.

This makes sense because people will expect attachments to work everywhere when they enable this module. This also matches comment.module's behaviour, where comments are allowed by default unless turned off.
parent 3bc3eb62
...@@ -83,10 +83,10 @@ function upload_file_download($file) { ...@@ -83,10 +83,10 @@ function upload_file_download($file) {
function upload_nodeapi(&$node, $op, $arg) { function upload_nodeapi(&$node, $op, $arg) {
switch ($op) { switch ($op) {
case 'settings': case 'settings':
$output[t('attachments')] = form_checkbox(NULL, "upload_$node->type", 1, variable_get("upload_$node->type", 0)); $output[t('attachments')] = form_checkbox(NULL, "upload_$node->type", 1, variable_get("upload_$node->type", 1));
break; break;
case 'form param': case 'form param':
if (variable_get("upload_$node->type", 0)) { if (variable_get("upload_$node->type", 1)) {
$output['options'] = array('enctype' => 'multipart/form-data'); $output['options'] = array('enctype' => 'multipart/form-data');
} }
break; break;
...@@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) { ...@@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) {
} }
break; break;
case 'form post': case 'form post':
if (variable_get("upload_$node->type", 0) == 1) { if (variable_get("upload_$node->type", 1) == 1) {
$output = upload_form($node); $output = upload_form($node);
} }
break; break;
case 'load': case 'load':
if (variable_get("upload_$node->type", 0) == 1) { if (variable_get("upload_$node->type", 1) == 1) {
$output->files = upload_load($node); $output->files = upload_load($node);
} }
break; break;
......
...@@ -83,10 +83,10 @@ function upload_file_download($file) { ...@@ -83,10 +83,10 @@ function upload_file_download($file) {
function upload_nodeapi(&$node, $op, $arg) { function upload_nodeapi(&$node, $op, $arg) {
switch ($op) { switch ($op) {
case 'settings': case 'settings':
$output[t('attachments')] = form_checkbox(NULL, "upload_$node->type", 1, variable_get("upload_$node->type", 0)); $output[t('attachments')] = form_checkbox(NULL, "upload_$node->type", 1, variable_get("upload_$node->type", 1));
break; break;
case 'form param': case 'form param':
if (variable_get("upload_$node->type", 0)) { if (variable_get("upload_$node->type", 1)) {
$output['options'] = array('enctype' => 'multipart/form-data'); $output['options'] = array('enctype' => 'multipart/form-data');
} }
break; break;
...@@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) { ...@@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) {
} }
break; break;
case 'form post': case 'form post':
if (variable_get("upload_$node->type", 0) == 1) { if (variable_get("upload_$node->type", 1) == 1) {
$output = upload_form($node); $output = upload_form($node);
} }
break; break;
case 'load': case 'load':
if (variable_get("upload_$node->type", 0) == 1) { if (variable_get("upload_$node->type", 1) == 1) {
$output->files = upload_load($node); $output->files = upload_load($node);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment