X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fexpire.php;h=098125a79864efb3315fe75ebd2319b6eca5a0de;hb=0d7996d8520a215189ed7a37ff180f6eb7e67d01;hp=35b109a50a487156ac53fe3d3ec66bfb1c9906e6;hpb=291906de5f3074407253241e5ccbb5af633e0c22;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');