From 4a0982acd021176d21ec8a59b269314be4685600 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 23 Apr 2017 23:18:23 +0100 Subject: [PATCH] Expire qvitter notifications --- src/freedombone-utils-gnusocialtools | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 4c2140c6..176c97c3 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -542,6 +542,7 @@ function expire_gnusocial_posts { echo "\$notice_query=\"DELETE FROM notice WHERE created <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script echo "\$conversation_query=\"DELETE FROM conversation WHERE created <= '$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script echo "\$reply_query=\"DELETE FROM reply WHERE modified <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script + echo "\$notification_query=\"DELETE FROM qvitternotification WHERE created <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script echo 'mysql_query($notice_query);' >> $gnusocial_expire_posts_script echo '$rowaff1=mysql_affected_rows();' >> $gnusocial_expire_posts_script @@ -549,10 +550,12 @@ function expire_gnusocial_posts { echo '$rowaff2=mysql_affected_rows();' >> $gnusocial_expire_posts_script echo 'mysql_query($reply_query);' >> $gnusocial_expire_posts_script echo '$rowaff3=mysql_affected_rows();' >> $gnusocial_expire_posts_script + echo 'mysql_query($notification_query);' >> $gnusocial_expire_posts_script + echo '$rowaff4=mysql_affected_rows();' >> $gnusocial_expire_posts_script echo 'mysql_close();' >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script echo -n "echo \"Expire ${gnusocial_type} posts: " >> $gnusocial_expire_posts_script - echo '$rowaff1 notices, $rowaff2 conversations, and $rowaff3 replies deleted from database.\n";' >> $gnusocial_expire_posts_script + echo '$rowaff1 notices, $rowaff2 conversations, $rowaff3 replies, and $rowaff4 qvitter notifications deleted from database.\n";' >> $gnusocial_expire_posts_script chmod +x $gnusocial_expire_posts_script gnusocial_expire_script=/usr/bin/${gnusocial_type}-expire