From 033115cf449e113ee581e663f85a72f8df3af839 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 26 Mar 2011 13:00:06 +0000 Subject: don't allow a user to remove a title on a file, must replace with another title git-svn-id: http://code.elgg.org/elgg/trunk@8837 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/actions/file/upload.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 4deaabcac..e04203f67 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -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; -- cgit v1.2.3