X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fexpire.php;h=098125a79864efb3315fe75ebd2319b6eca5a0de;hb=c0b5339691d63fcbae6caa7a032923d2826f9df0;hp=35b109a50a487156ac53fe3d3ec66bfb1c9906e6;hpb=46c5b3b419bd3601d72b154e792cb2b2ad9477dc;p=friendica.git diff --git a/include/expire.php b/include/expire.php index 35b109a50a..098125a798 100644 --- a/include/expire.php +++ b/include/expire.php @@ -11,12 +11,13 @@ function expire_run(&$argv, &$argc){ // physically remove anything that has been deleted for more than two months - $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); + $r = q("DELETE FROM `item` WHERE `deleted` = 1 AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"); // make this optional as it could have a performance impact on large sites - if(intval(get_config('system','optimize_items'))) - q("optimize table item"); + if (intval(get_config('system','optimize_items'))) { + q("OPTIMIZE TABLE `item`"); + } logger('expire: start');