From: cash Date: Sat, 26 Mar 2011 13:00:06 +0000 (+0000) Subject: don't allow a user to remove a title on a file, must replace with another title X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=033115cf449e113ee581e663f85a72f8df3af839;p=lorea%2Felgg.git 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 --- 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;