aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:52:11 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:52:11 +0000
commit482bc3b465e311db57d4ead4a23f826eedfb4372 (patch)
tree3c61e51d7a34ed28e5b4fc375cc5144346659412
parent523d88a5cb91342634c2f7d5a83044a8bd7dd9a1 (diff)
downloadelgg-482bc3b465e311db57d4ead4a23f826eedfb4372.tar.gz
elgg-482bc3b465e311db57d4ead4a23f826eedfb4372.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Minor tweak git-svn-id: https://code.elgg.org/elgg/trunk@599 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/file/actions/upload.php38
1 files changed, 18 insertions, 20 deletions
diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php
index 255d8ef06..1f5107bf0 100644
--- a/mod/file/actions/upload.php
+++ b/mod/file/actions/upload.php
@@ -21,26 +21,24 @@
$result = $file->save();
if ($result)
- system_message(elgg_echo("file:saved"));
- else
- system_message(elgg_echo("file:uploadfailed"));
-
- $file->setFilename($_FILES['upload']['name']);
- $file->setMimeType($_FILES['upload']['type']);
-
- $file->open("write");
- $file->write(get_uploaded_file('upload'));
- $file->close();
-
- $file->title = $title;
- $file->description = $desc;
-
- $result = $file->save();
-
- // Save tags
- $tags = explode(",", $tags);
- $file->tag = $tags;
-
+ {
+ $file->setFilename($_FILES['upload']['name']);
+ $file->setMimeType($_FILES['upload']['type']);
+
+ $file->open("write");
+ $file->write(get_uploaded_file('upload'));
+ $file->close();
+
+ $file->title = $title;
+ $file->description = $desc;
+
+ $result = $file->save();
+
+ // Save tags
+ $tags = explode(",", $tags);
+ $file->tag = $tags;
+ }
+
if ($result)
system_message(elgg_echo("file:saved"));
else