aboutsummaryrefslogtreecommitdiffstats
path: root/include/expire.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/expire.php')
-rw-r--r--include/expire.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/expire.php b/include/expire.php
index e5d456896..e75594b5f 100644
--- a/include/expire.php
+++ b/include/expire.php
@@ -12,10 +12,7 @@ function expire_run($argv, $argc){
// perform final cleanup on previously delete items
- $r = q("select id from item where (item_restrict & %d) > 0 and (item_restrict & %d) = 0
- and changed < %s - INTERVAL %s",
- intval(ITEM_DELETED),
- intval(ITEM_PENDING_REMOVE),
+ $r = q("select id from item where item_deleted = 1 and item_pending_remove = 0 and changed < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('10 DAY')
);
if ($r) {
@@ -27,8 +24,7 @@ function expire_run($argv, $argc){
// physically remove anything that has been deleted for more than two months
/** @FIXME - this is a wretchedly inefficient query */
- $r = q("delete from item where ( item_restrict & %d ) > 0 and changed < %s - INTERVAL %s",
- intval(ITEM_PENDING_REMOVE),
+ $r = q("delete from item where item_pending_remove = 1 and changed < %s - INTERVAL %s",
db_utcnow(), db_quoteinterval('36 DAY')
);
@@ -49,7 +45,7 @@ function expire_run($argv, $argc){
foreach ($r as $rr) {
// expire the sys channel separately
- if ($rr['channel_pageflags'] & PAGE_SYSTEM)
+ if (intval($rr['channel_system']))
continue;
// service class default (if non-zero) over-rides the site default