diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-09-09 01:11:15 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-09-09 01:11:15 +0000 |
commit | efa3b16151f59d57b7ac8280f10b5db83c29ce97 (patch) | |
tree | aae1120d7c2156c22cc6dd874106ce1acab08292 | |
parent | 5ccb3887f61af7b670f0fafe077401529c141700 (diff) | |
download | elgg-efa3b16151f59d57b7ac8280f10b5db83c29ce97.tar.gz elgg-efa3b16151f59d57b7ac8280f10b5db83c29ce97.tar.bz2 |
using filename if no title given
-rw-r--r-- | actions/edit_multi.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/edit_multi.php b/actions/edit_multi.php index 08947f1a4..92252b6dd 100644 --- a/actions/edit_multi.php +++ b/actions/edit_multi.php @@ -2,6 +2,7 @@ /**
* Elgg album: multi image edit action
*
+ * This is called when uploading images
*/
// Make sure we're logged in
@@ -25,8 +26,11 @@ // Convert string of tags into a preformatted array
$tagarray = string_to_tag_array($tags_array[$key]);
- //set description appropriately
- $image->title = $title_array[$key];
+ //set title appropriately
+ if ($title_array[$key])
+ $image->title = $title_array[$key];
+ else
+ $image->title = substr($image->originalfilename, 0, strrpos($image->originalfilename, '.'));
//set description appropriately
$image->description = $caption_array[$key];
|