summaryrefslogtreecommitdiff
path: root/forum/utils
diff options
context:
space:
mode:
Diffstat (limited to 'forum/utils')
-rw-r--r--forum/utils/files.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/forum/utils/files.php b/forum/utils/files.php
index 2190f42..b9758ae 100644
--- a/forum/utils/files.php
+++ b/forum/utils/files.php
@@ -88,13 +88,13 @@ class Files {
public function newFile($tempfile, $name)
{
- global $PERMSTORE;
+ global $PERMSTORE, $current_user;
$fid = time();
// move tempfile to permstore and put it in db.
move_uploaded_file($tempfile, $PERMSTORE . "/" . $fid);
- $f = new File($fid, $name, getMimeType($name)->name);
+ $f = new File($fid, $current_user->uid, $name, getMimeType($name)->name);
$this->add($f);
// We cannot wait to write the db, otherwise we'll get inconsistency!