diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-14 16:13:56 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-14 16:13:56 +0000 |
commit | 2581779073b9e2029a91041c0c775de40e6b8ea8 (patch) | |
tree | 1674170ad12747958ac58c81b0d1496981502814 /mod/file/actions | |
parent | e2bcd04612f751c035ab4e331a7a2176e9f7e35b (diff) | |
download | elgg-2581779073b9e2029a91041c0c775de40e6b8ea8.tar.gz elgg-2581779073b9e2029a91041c0c775de40e6b8ea8.tar.bz2 |
Merge r5761:5788 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6053 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/actions')
-rw-r--r-- | mod/file/actions/upload.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php index e515c73e0..5a22b1231 100644 --- a/mod/file/actions/upload.php +++ b/mod/file/actions/upload.php @@ -87,9 +87,9 @@ // use same filename on the disk - ensures thumbnails are overwritten $filestorename = $file->getFilename(); - $filestorename = substr($filestorename, strlen($prefix)); + $filestorename = elgg_substr($filestorename, elgg_strlen($prefix)); } else { - $filestorename = strtolower(time().$_FILES['upload']['name']); + $filestorename = elgg_strtolower(time().$_FILES['upload']['name']); } $file->setFilename($prefix.$filestorename); @@ -139,6 +139,9 @@ unset($thumblarge); } } + } else { + // not saving a file but still need to save the entity to push attributes to database + $file->save(); } // make sure session cache is cleared |