diff --git a/include/items.php b/include/items.php index d33d8b1bb..9608d8211 100644 --- a/include/items.php +++ b/include/items.php @@ -4790,7 +4790,7 @@ function list_attached_local_files($body) { function fix_attached_permissions($uid,$body,$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny,$token = EMPTY_STR) { $channel = Channel::from_id($uid); - + $files = list_attached_local_files($body); if (! $files) { return; diff --git a/include/misc.php b/include/misc.php index e41158b8c..c9c205f4d 100644 --- a/include/misc.php +++ b/include/misc.php @@ -2739,35 +2739,11 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) } } -function xchan_mail_query(&$item) -{ - $arr = []; - $chans = null; - if ($item) { - if ($item['from_xchan'] && (! in_array("'" . dbesc($item['from_xchan']) . "'", $arr))) { - $arr[] = "'" . dbesc($item['from_xchan']) . "'"; - } - if ($item['to_xchan'] && (! in_array("'" . dbesc($item['to_xchan']) . "'", $arr))) { - $arr[] = "'" . dbesc($item['to_xchan']) . "'"; - } - } - - if (count($arr)) { - $chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash - where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1 and hubloc_deleted = 0"); - } - if ($chans) { - $item['from'] = find_xchan_in_array($item['from_xchan'], $chans); - $item['to'] = find_xchan_in_array($item['to_xchan'], $chans); - } -} - - function find_xchan_in_array($xchan, $arr) { if (count($arr)) { foreach ($arr as $x) { - if ($x['xchan_hash'] === $xchan) { + if (strtolower($x['xchan_hash']) === strtolower($xchan)) { return $x; } } diff --git a/src/Daemon/Poller.php b/src/Daemon/Poller.php index 88c52ab07..81482a3ae 100644 --- a/src/Daemon/Poller.php +++ b/src/Daemon/Poller.php @@ -26,10 +26,7 @@ class Poller implements DaemonInterface } } - $interval = intval(get_config('system', 'poll_interval')); - if (! $interval) { - $interval = ((get_config('system', 'delivery_interval') === false) ? 3 : intval(get_config('system', 'delivery_interval'))); - } + $interval = intval(get_config('system', 'poll_interval', 3)); // Check for a lockfile. If it exists, but is over an hour old, it's stale. Ignore it. $lockfile = 'cache/poller';