summaryrefslogtreecommitdiff
path: root/modules/upload/upload.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-08-24 19:21:30 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-08-24 19:21:30 +0000
commit44f341bebc125b7b1b53177e7f858e4ccf55e3df (patch)
tree391c80ae444ed4a9d062fefe7e3c8beb63e98af6 /modules/upload/upload.module
parentcdff29b0ab45123edab24a51f2258171aa9ae348 (diff)
downloadbrdo-44f341bebc125b7b1b53177e7f858e4ccf55e3df.tar.gz
brdo-44f341bebc125b7b1b53177e7f858e4ccf55e3df.tar.bz2
Patch by me and Kjartan.
Upload.module - Fixing a bug caused by the PHP5 patches. Beware: PHP4's array_merge() will silently accept objects and convert them to arrays. We should not depend on this behaviour in the future. File.inc / file-using modules: - Removing the constant FILE_SEPARATOR: forward slashes work fine on Windows, and it was being used incorrectly as an URL separator sometimes. - Adding @ to mkdir and chmod to supress ugly PHP errors. They are already reported with drupal_set_message(). - Fixing default for variable 'file_directory_temp'. - Clarifying the help tip for 'file_directory_temp' in admin > settings.
Diffstat (limited to 'modules/upload/upload.module')
-rw-r--r--modules/upload/upload.module3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 58e9f2d56..a1ac58ef9 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -177,7 +177,7 @@ function upload_nodeapi(&$node, $op, $arg) {
break;
case 'load':
if (variable_get("upload_$node->type", 1) == 1 && user_access('upload files')) {
- $output->files = upload_load($node);
+ $output['files'] = upload_load($node);
}
break;
case 'view':
@@ -209,7 +209,6 @@ function upload_nodeapi(&$node, $op, $arg) {
foreach ($previews as $file) {
$old = file_create_filename($file->filename, file_create_path());
$new = url($old);
- //drupal_set_message("debug: $old $new");
$node->body = str_replace($old, $new, $node->body);
$node->teaser = str_replace($old, $new, $node->teaser);
}