]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_attach.php
file attachments
[friendica.git] / mod / wall_attach.php
index b539171cf9722761b78ec9314d407301dcfc6ced..f18fd10b74faf004daeced684628d559de30ee46 100644 (file)
@@ -64,11 +64,12 @@ function wall_attach_post(&$a) {
        $mimetype = mime_content_type($src);
        $hash = random_string();
        $created = datetime_convert();
-dbg(1);
-       $r = q("INSERT INTO `attach` ( `uid`, `hash`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` )
-               VALUES ( %d, '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
+
+       $r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` )
+               VALUES ( %d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
                intval($page_owner_uid),
                dbesc($hash),
+               dbesc($filename),
                dbesc($mimetype),
                intval($filesize),
                dbesc($filedata),