From 4fef29e61c32b129f0090a4962d91607337a9406 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 29 Oct 2017 22:21:52 -0700 Subject: memory overflow trying to delete a connection with a very high noise to signal ratio --- include/connections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/connections.php b/include/connections.php index 60bce018e..e9d7daa2d 100644 --- a/include/connections.php +++ b/include/connections.php @@ -369,7 +369,7 @@ function contact_remove($channel_id, $abook_id) { return false; - $r = q("select * from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d", + $r = q("select id from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d", dbesc($abook['abook_xchan']), dbesc($abook['abook_xchan']), intval($channel_id) -- cgit v1.2.3 From 60da235efb53b4e38c91489b500dac75facc4a9b Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 30 Oct 2017 20:43:24 -0700 Subject: use 1) personal setting, 2) site setting, 3) default false - for system.channel_menu --- include/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 89947e270..af0ebbae2 100644 --- a/include/nav.php +++ b/include/nav.php @@ -312,7 +312,7 @@ EOT; '$pleasewait' => t('Please wait...'), '$nav_apps' => $nav_apps, '$navbar_apps' => $navbar_apps, - '$channel_menu' => get_config('system','channel_menu'), + '$channel_menu' => get_pconfig(App::$profile_uid,'system','channel_menu',get_config('system','channel_menu')), '$channel_thumb' => ((App::$profile) ? App::$profile['thumb'] : ''), '$channel_apps' => $channel_apps, '$addapps' => t('Add Apps'), -- cgit v1.2.3 From 6efef3922b9fe6864c0855e6407b77ca54af70c5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 31 Oct 2017 15:41:44 -0700 Subject: add another delivery control parameter (force queue threshold) --- include/queue_fn.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/queue_fn.php b/include/queue_fn.php index c9179b953..c09033d0a 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -158,6 +158,16 @@ function queue_deliver($outq, $immediate = false) { } } + if($immediate) { + $x = q("select count(outq_hash) as total from outq where outq_delivered = 0"); + if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',300))) { + logger('immediate delivery deferred.', LOGGER_DEBUG, LOG_INFO); + update_queue_item($outq['outq_hash']); + return; + } + } + + $arr = array('outq' => $outq, 'base' => $base, 'handled' => false, 'immediate' => $immediate); call_hooks('queue_deliver',$arr); if($arr['handled']) @@ -205,7 +215,7 @@ function queue_deliver($outq, $immediate = false) { else { logger('deliver: queue post returned ' . $result['return_code'] . ' from ' . $outq['outq_posturl'],LOGGER_DEBUG); - update_queue_item($outq['outq_posturl']); + update_queue_item($outq['outq_hash']); } return; } -- cgit v1.2.3 From 7d9d1e0cdb21e47aec20b64148a0714323383914 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 1 Nov 2017 02:15:40 -0700 Subject: Maria's profile photo issue, please push to master. --- include/zot.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/zot.php b/include/zot.php index dad30dbb0..5270ed8b8 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3649,6 +3649,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { $disallowed = array('id','aid','uid','guid'); foreach($arr['profile'] as $profile) { + $x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1", dbesc($profile['profile_guid']), intval($channel['channel_id']) @@ -3671,6 +3672,9 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { if(in_array($k,$disallowed)) continue; + if($profile['is_default'] && in_array($k,['photo','thumb'])) + continue; + if($k === 'name') $clean['fullname'] = $v; elseif($k === 'with') -- cgit v1.2.3