Last blob is now filled with the new functions
This commit is contained in:
parent
dfd48dd6f6
commit
72b42ad688
1 changed files with 6 additions and 15 deletions
|
@ -138,21 +138,12 @@ function wall_attach_post(App $a) {
|
||||||
$mimetype = z_mime_content_type($filename);
|
$mimetype = z_mime_content_type($filename);
|
||||||
$hash = get_guid(64);
|
$hash = get_guid(64);
|
||||||
$created = datetime_convert();
|
$created = datetime_convert();
|
||||||
$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' ) ",
|
$fields = array('uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
|
||||||
intval($page_owner_uid),
|
'filesize' => $filesize, 'data' => $filedata, 'created' => $created, 'edited' => $created,
|
||||||
dbesc($hash),
|
'allow_cid' => '<' . $page_owner_cid . '>', 'allow_gid' => '','deny_cid' => '', 'deny_gid' => '');
|
||||||
dbesc($filename),
|
|
||||||
dbesc($mimetype),
|
$r = dba::insert('attach', $fields);
|
||||||
intval($filesize),
|
|
||||||
dbesc($filedata),
|
|
||||||
dbesc($created),
|
|
||||||
dbesc($created),
|
|
||||||
dbesc('<' . $page_owner_cid . '>'),
|
|
||||||
dbesc(''),
|
|
||||||
dbesc(''),
|
|
||||||
dbesc('')
|
|
||||||
);
|
|
||||||
|
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue