]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Expire.php
Merge pull request #5626 from annando/notices-oh-yeah
[friendica.git] / src / Worker / Expire.php
index efb2cb03db8a152da4794bb76f830e7fc1af7ac0..b6096b5849405d11b2f68fec6a81c245157a44ad 100644 (file)
@@ -29,20 +29,9 @@ class Expire
                        logger('Delete expired items', LOGGER_DEBUG);
                        // physically remove anything that has been deleted for more than two months
                        $condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
-                       $rows = DBA::select('item', ['id', 'iaid', 'icid', 'psid'],  $condition);
+                       $rows = DBA::select('item', ['id'],  $condition);
                        while ($row = DBA::fetch($rows)) {
                                DBA::delete('item', ['id' => $row['id']]);
-                               if (!empty($row['iaid']) && !DBA::exists('item', ['iaid' => $row['iaid']])) {
-                                       DBA::delete('item-activity', ['id' => $row['iaid']]);
-                               }
-                               if (!empty($row['icid']) && !DBA::exists('item', ['icid' => $row['icid']])) {
-                                       DBA::delete('item-content', ['id' => $row['icid']]);
-                               }
-                               // When the permission set will be used in photo and events as well.
-                               // this query here needs to be extended.
-                               if (!empty($row['psid']) && !DBA::exists('item', ['psid' => $row['psid']])) {
-                                       DBA::delete('permissionset', ['id' => $row['psid']]);
-                               }
                        }
                        DBA::close($rows);