]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
using filename if no title given
authorCash Costello <cash.costello@gmail.com>
Wed, 9 Sep 2009 01:11:15 +0000 (01:11 +0000)
committerCash Costello <cash.costello@gmail.com>
Wed, 9 Sep 2009 01:11:15 +0000 (01:11 +0000)
actions/edit_multi.php

index 08947f1a4833bcda2fc651a7994fef395a3369d0..92252b6dd85777bf9f96a689dc66381dcf9d3dba 100644 (file)
@@ -2,6 +2,7 @@
        /**\r
         * Elgg album: multi image edit action\r
         * \r
+        * This is called when uploading images\r
         */\r
         \r
        // Make sure we're logged in \r
                        // Convert string of tags into a preformatted array\r
                        $tagarray = string_to_tag_array($tags_array[$key]);\r
 \r
-                       //set description appropriately\r
-                       $image->title = $title_array[$key];\r
+                       //set title appropriately\r
+                       if ($title_array[$key])\r
+                               $image->title = $title_array[$key];\r
+                       else\r
+                               $image->title = substr($image->originalfilename, 0, strrpos($image->originalfilename, '.'));\r
                        \r
                        //set description appropriately\r
                        $image->description = $caption_array[$key];\r