From 44f341bebc125b7b1b53177e7f858e4ccf55e3df Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 24 Aug 2004 19:21:30 +0000 Subject: 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. --- modules/upload/upload.module | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/upload/upload.module') 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); } -- cgit v1.2.3