From: Cash Costello Date: Wed, 9 Sep 2009 01:11:15 +0000 (+0000) Subject: using filename if no title given X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=efa3b16151f59d57b7ac8280f10b5db83c29ce97;p=lorea%2Felgg.git using filename if no title given --- 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];