We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 6ab46c70 authored by Evan Prodromou's avatar Evan Prodromou

Delete file links when Notice is deleted

parent a2000f88
......@@ -135,6 +135,7 @@ class Notice extends Memcached_DataObject
// NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
......@@ -1785,6 +1786,21 @@ class Notice extends Memcached_DataObject
function clearFiles()
$f2p = new File_to_post();
$f2p->post_id = $this->id;
if ($f2p->find()) {
while ($f2p->fetch()) {
// FIXME: decide whether to delete File objects
// ...and related (actual) files
function clearRepeats()
$repeatNotice = new Notice();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment