summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/upload/upload.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 9225d5a6f..07aed8d65 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -506,7 +506,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
if (!variable_get('clean_url', 0)) {
$previews = array();
foreach ($node->files as $file) {
- if (strpos($file['fid'], 'upload') !== FALSE) {
+ if (strpos($file->fid, 'upload') !== FALSE) {
$previews[] = $file;
}
}
@@ -517,7 +517,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
// can use the final URL in the body before having actually saved (to
// place inline images for example).
foreach ($previews as $file) {
- $old = file_create_filename($file['filename'], file_create_path());
+ $old = file_create_filename($file->filename, file_create_path());
$new = url($old);
$node->body = str_replace($old, $new, $node->body);
$node->teaser = str_replace($old, $new, $node->teaser);