aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-28 23:24:10 -0700
committerfriendica <info@friendica.com>2012-05-28 23:24:10 -0700
commit0241bd1fbf28e15daeb939bc14976cd2fd6d3251 (patch)
tree759bddd355a3c18496ef4be5999b0c6df1cdb952 /include/items.php
parent2dc7e53435ffcc6dc7e450c15c7b2518b27ec2e5 (diff)
downloadvolse-hubzilla-0241bd1fbf28e15daeb939bc14976cd2fd6d3251.tar.gz
volse-hubzilla-0241bd1fbf28e15daeb939bc14976cd2fd6d3251.tar.bz2
volse-hubzilla-0241bd1fbf28e15daeb939bc14976cd2fd6d3251.zip
Provide backend option to only expire other peoples' conversations.
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 66e111b55..4b79003f6 100644
--- a/include/items.php
+++ b/include/items.php
@@ -3076,13 +3076,20 @@ function item_getfeedattach($item) {
function item_expire($uid,$days) {
- if((! $uid) || (! $days))
+ if((! $uid) || ($days < 1))
return;
+ // $expire_network_only = save your own wall posts
+ // and just expire conversations started by others
+
+ $expire_network_only = get_pconfig($uid,'expire','expire_network_only');
+ $sql_extra = ((intval($expire_network_only)) ? " AND wall = 0 " : "");
+
$r = q("SELECT * FROM `item`
WHERE `uid` = %d
AND `created` < UTC_TIMESTAMP() - INTERVAL %d DAY
AND `id` = `parent`
+ $sql_extra
AND `deleted` = 0",
intval($uid),
intval($days)