mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
firehose: provide system prefs to allow folks to fine tune to their needs
This commit is contained in:
parent
2b6feeb835
commit
1f931c0e3c
2 changed files with 17 additions and 4 deletions
|
@ -29,10 +29,19 @@ function expire_run($argv, $argc){
|
|||
}
|
||||
}
|
||||
|
||||
$x = get_sys_channel();
|
||||
if($x)
|
||||
item_expire($x['channel_id'],30);
|
||||
|
||||
$x = get_sys_channel();
|
||||
if($x) {
|
||||
|
||||
// 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('externals','expire_days');
|
||||
if($expire_days === false)
|
||||
$expire_days = 30;
|
||||
if($expire_days)
|
||||
item_expire($x['channel_id'],$expire_days);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,11 @@ function externals_run($argv, $argc){
|
|||
}
|
||||
|
||||
if($url) {
|
||||
$feedurl = $url . '/zotfeed?f=&mindate=' . urlencode(datetime_convert('','','now - 15 days'));
|
||||
$days = intval(getconfig('externals','since_days'));
|
||||
if($days === false)
|
||||
$days = 15;
|
||||
|
||||
$feedurl = $url . '/zotfeed?f=&mindate=' . urlencode(datetime_convert('','','now - ' . $days . ' days'));
|
||||
$x = z_fetch_url($feedurl);
|
||||
|
||||
if(($x) && ($x['success'])) {
|
||||
|
|
Loading…
Reference in a new issue