]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
don't allow a user to remove a title on a file, must replace with another title
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Mar 2011 13:00:06 +0000 (13:00 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Mar 2011 13:00:06 +0000 (13:00 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8837 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/file/actions/file/upload.php

index 4deaabcac19048343624bb14aa8c00007daf4fd0..e04203f67a732ae072c6b07939968b51c9fb9740 100644 (file)
@@ -67,6 +67,11 @@ if ($new_file) {
                register_error(elgg_echo('file:noaccess'));
                forward(REFERER);
        }
+
+       if (!$title) {
+               // user blanked title, but we need one
+               $title = $file->title;
+       }
 }
 
 $file->title = $title;