Skip to content
Snippets Groups Projects
Commit f37cfb92 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

Fix for #81740 by myself. Reference objects as objects.

parent 6baece1e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -506,7 +506,7 @@ function upload_nodeapi(&$node, $op, $teaser) { ...@@ -506,7 +506,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
if (!variable_get('clean_url', 0)) { if (!variable_get('clean_url', 0)) {
$previews = array(); $previews = array();
foreach ($node->files as $file) { foreach ($node->files as $file) {
if (strpos($file['fid'], 'upload') !== FALSE) { if (strpos($file->fid, 'upload') !== FALSE) {
$previews[] = $file; $previews[] = $file;
} }
} }
...@@ -517,7 +517,7 @@ function upload_nodeapi(&$node, $op, $teaser) { ...@@ -517,7 +517,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
// can use the final URL in the body before having actually saved (to // can use the final URL in the body before having actually saved (to
// place inline images for example). // place inline images for example).
foreach ($previews as $file) { 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); $new = url($old);
$node->body = str_replace($old, $new, $node->body); $node->body = str_replace($old, $new, $node->body);
$node->teaser = str_replace($old, $new, $node->teaser); $node->teaser = str_replace($old, $new, $node->teaser);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment