aboutsummaryrefslogtreecommitdiff
path: root/mod/file/actions/file/upload.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 13:00:06 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 13:00:06 +0000
commit033115cf449e113ee581e663f85a72f8df3af839 (patch)
treeb66b5bcc054f96756d00c1299af90becebad29b6 /mod/file/actions/file/upload.php
parent08070561a69db8dc17f9207079937135228603ec (diff)
downloadelgg-033115cf449e113ee581e663f85a72f8df3af839.tar.gz
elgg-033115cf449e113ee581e663f85a72f8df3af839.tar.bz2
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
Diffstat (limited to 'mod/file/actions/file/upload.php')
-rw-r--r--mod/file/actions/file/upload.php5
1 files changed, 5 insertions, 0 deletions
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;