diff options
author | friendica <info@friendica.com> | 2015-03-24 17:09:42 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-24 17:09:42 -0700 |
commit | 63b8020969434756a7b966ae615c28bf7680f2f8 (patch) | |
tree | 0999882404277cb496fa713fcc2481b26541759e /include/items.php | |
parent | 1f427e0e5b3a5526625e90d43746c89953ab493a (diff) | |
download | volse-hubzilla-63b8020969434756a7b966ae615c28bf7680f2f8.tar.gz volse-hubzilla-63b8020969434756a7b966ae615c28bf7680f2f8.tar.bz2 volse-hubzilla-63b8020969434756a7b966ae615c28bf7680f2f8.zip |
more work on expiration, make system limits useful - even in retrospect
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index a1515ad88..da0e50c4c 100755 --- a/include/items.php +++ b/include/items.php @@ -3922,6 +3922,10 @@ function item_expire($uid,$days) { $expire_network_only = 1; + $expire_limit = get_config('system','expire_limit'); + if(! intval($expire_limit)) + $expire_limit = 5000; + $sql_extra = ((intval($expire_network_only)) ? " AND not (item_flags & " . intval(ITEM_WALL) . ") > 0 " : ""); $r = q("SELECT * FROM `item` @@ -3930,7 +3934,7 @@ function item_expire($uid,$days) { AND `id` = `parent` $sql_extra AND NOT ( item_flags & %d )>0 - AND (item_restrict = 0 ) ", + AND (item_restrict = 0 ) LIMIT $expire_limit ", intval($uid), db_utcnow(), db_quoteinterval(intval($days).' DAY'), intval(ITEM_RETAINED) |