summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Haug2010-12-06 05:50:49 +0000
committerNathan Haug2010-12-06 05:50:49 +0000
commitea0797022c0acaaf10728a552631dabd3d70029f (patch)
treee83a7ba564aa52568c135d3b4fb721bf5a909c02
parente6289e711ee6fbfac25a24224046d9cf8e36aace (diff)
#749926 by sitiveni: Imagefield title and alt field are reset after re-editing source node.
-rw-r--r--filefield_field.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/filefield_field.inc b/filefield_field.inc
index e4a6b88..37d2329 100644
--- a/filefield_field.inc
+++ b/filefield_field.inc
@@ -145,9 +145,9 @@ function filefield_field_load($node, $field, &$items, $teaser, $page) {
}
// Merge any data added by modules in hook_file_load().
if (isset($file['data']) && isset($item['data'])) {
- $file['data'] = array_merge((array) $item['data'], (array) $file['data']);
+ $file['data'] = array_merge((array) $file['data'], (array) $item['data']);
}
- $items[$delta] = array_merge($item, $file);
+ $items[$delta] = array_merge($file, $item);
}
}
@@ -290,9 +290,9 @@ function filefield_field_sanitize($node, $field, &$items, $teaser, $page) {
if (!empty($item['fid']) && empty($item['filepath'])) {
$file = (array) field_file_load($item['fid']);
if (isset($file['data'])) {
- $file['data'] = array_merge($items[$delta]['data'], $file['data']);
+ $file['data'] = array_merge($file['data'], $items[$delta]['data']);
}
- $items[$delta] = array_merge($items[$delta], $file);
+ $items[$delta] = array_merge($file, $items[$delta]);
}
// Verify the file exists on the server.