aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Expire.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
committerMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
commit45275910e606a02b12393714ea3b0409da440d61 (patch)
tree10b2d173d58cb930f8df28fe75af73dd4974c08c /Zotlabs/Daemon/Expire.php
parent0c1d0f7498661fb34dcca6f3c6566e757af310a7 (diff)
parentc04e781926a78e514cdf211fa24930a331149072 (diff)
downloadvolse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.tar.gz
volse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.tar.bz2
volse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.zip
Merge branch '9.2RC'master
Diffstat (limited to 'Zotlabs/Daemon/Expire.php')
-rw-r--r--Zotlabs/Daemon/Expire.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/Zotlabs/Daemon/Expire.php b/Zotlabs/Daemon/Expire.php
index 6ab67150f..ad52a6b71 100644
--- a/Zotlabs/Daemon/Expire.php
+++ b/Zotlabs/Daemon/Expire.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Daemon;
+use Zotlabs\Lib\Config;
+
require_once('include/items.php');
class Expire {
@@ -10,14 +12,14 @@ class Expire {
cli_startup();
- $pid = get_config('procid', 'expire', false);
+ $pid = Config::Get('procid', 'expire', false);
if ($pid && (function_exists('posix_kill') ? posix_kill($pid, 0) : true)) {
logger('procedure already run with pid ' . $pid, LOGGER_DEBUG);
return;
}
$pid = getmypid();
- set_config('procid', 'expire', $pid);
+ Config::Set('procid', 'expire', $pid);
// perform final cleanup on previously delete items
@@ -38,13 +40,13 @@ class Expire {
db_quoteinterval('36 DAY')
);
- if (intval(get_config('system', 'optimize_items')))
+ if (intval(Config::Get('system', 'optimize_items')))
q("optimize table item");
logger('expire: start with pid ' . $pid, LOGGER_DEBUG);
- $site_expire = intval(get_config('system', 'default_expire_days', 30));
- $commented_days = intval(get_config('system', 'active_expire_days', 7));
+ $site_expire = intval(Config::Get('system', 'default_expire_days', 30));
+ $commented_days = intval(Config::Get('system', 'active_expire_days', 7));
logger('site_expire: ' . $site_expire);
@@ -84,7 +86,7 @@ class Expire {
// this should probably just fetch the channel_expire_days from the sys channel,
// but there's no convenient way to set it.
- $expire_days = get_config('system', 'sys_expire_days');
+ $expire_days = Config::Get('system', 'sys_expire_days');
if ($expire_days === false)
$expire_days = 30;
@@ -101,7 +103,7 @@ class Expire {
logger('Expire: sys: done', LOGGER_DEBUG);
}
- del_config('procid', 'expire');
+ Config::Delete('procid', 'expire');
return;
}