Replace random strings with guids where appropriate.

This commit is contained in:
Michael Vogel 2015-08-14 07:48:28 +02:00
commit bacd71e1c6
5 changed files with 19 additions and 19 deletions

View file

@ -98,7 +98,7 @@ function wall_attach_post(&$a) {
$filedata = @file_get_contents($src);
$mimetype = z_mime_content_type($filename);
$hash = random_string();
$hash = get_guid(64);
$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' ) ",
@ -114,7 +114,7 @@ function wall_attach_post(&$a) {
dbesc(''),
dbesc(''),
dbesc('')
);
);
@unlink($src);