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.
4.5.x
Steven Wittens 2004-08-18 04:24:33 +00:00
parent 3bc3eb6246
commit 8050af67b3
2 changed files with 8 additions and 8 deletions

View File

@ -83,10 +83,10 @@ function upload_file_download($file) {
function upload_nodeapi(&$node, $op, $arg) {
switch ($op) {
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;
case 'form param':
if (variable_get("upload_$node->type", 0)) {
if (variable_get("upload_$node->type", 1)) {
$output['options'] = array('enctype' => 'multipart/form-data');
}
break;
@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) {
}
break;
case 'form post':
if (variable_get("upload_$node->type", 0) == 1) {
if (variable_get("upload_$node->type", 1) == 1) {
$output = upload_form($node);
}
break;
case 'load':
if (variable_get("upload_$node->type", 0) == 1) {
if (variable_get("upload_$node->type", 1) == 1) {
$output->files = upload_load($node);
}
break;

View File

@ -83,10 +83,10 @@ function upload_file_download($file) {
function upload_nodeapi(&$node, $op, $arg) {
switch ($op) {
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;
case 'form param':
if (variable_get("upload_$node->type", 0)) {
if (variable_get("upload_$node->type", 1)) {
$output['options'] = array('enctype' => 'multipart/form-data');
}
break;
@ -166,12 +166,12 @@ function upload_nodeapi(&$node, $op, $arg) {
}
break;
case 'form post':
if (variable_get("upload_$node->type", 0) == 1) {
if (variable_get("upload_$node->type", 1) == 1) {
$output = upload_form($node);
}
break;
case 'load':
if (variable_get("upload_$node->type", 0) == 1) {
if (variable_get("upload_$node->type", 1) == 1) {
$output->files = upload_load($node);
}
break;