From b451727a18bcbfa70fdc9178d14367a46f27a88a Mon Sep 17 00:00:00 2001 From: neku nekus Date: Wed, 15 Jan 2014 13:25:29 +0100 Subject: accounts? --- static/upload.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'static/upload.php') diff --git a/static/upload.php b/static/upload.php index 9b66b3c..a5d3069 100644 --- a/static/upload.php +++ b/static/upload.php @@ -1,4 +1,12 @@ tempfile, POMF_FILES_ROOT . $newname)) { // Add it to the database - $q = $db->prepare('INSERT INTO files (hash, orginalname, filename, size, date, expire, delid)' . - 'VALUES (:hash, :orig, :name, :size, :date, :expires, :delid)'); + $q = $db->prepare('INSERT INTO files (hash, orginalname, filename, size, date, expire, delid, fileowner)' . + 'VALUES (:hash, :orig, :name, :size, :date, :expires, :delid, :fileowner'); $q->bindValue(':hash', $file->get_sha1()); $q->bindValue(':orig', $file->name); $q->bindValue(':name', $newname); @@ -82,6 +90,7 @@ function upload_file ($file) { $q->bindValue(':date', date('Y-m-d')); $q->bindValue(':expires', null); $q->bindValue(':delid', sha1($file->tempfile)); + $q->bindValue(':fileowner', $fileowner; $q->execute(); return array( -- cgit v1.2.3