keep the to-do list somewhat current.

This commit is contained in:
friendica
2014-01-08 00:03:01 -08:00
parent 8b93881ce7
commit 8d562abe78
3 changed files with 16 additions and 3 deletions

View File

@@ -78,10 +78,17 @@ function filestorage_content(&$a) {
}
$file = intval(argv(2));
$r = q("delete from attach where id = %d and uid = %d limit 1",
$r = q("select hash from attach where id = %d and uid = %d limit 1",
dbesc($file),
intval($owner)
);
if(! $r) {
notice( t('File not found.') . EOL);
goaway(z_root() . '/filestorage' . $which);
}
attach_delete($owner,$r[0]['hash']);
goaway(z_root() . '/filestorage' . $which);
}