aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-01 22:34:31 -0700
committerzotlabs <mike@macgirvin.com>2017-11-01 22:34:31 -0700
commitf23c8e7597b6d96639738d0180e8cb277682ce23 (patch)
treeffcb15dd536800b67c9918756e41bb4accde3320 /include
parente539a9e7bdd035f96d8e8406e3433d34d99435da (diff)
parent11cdc36bcc7414002c2e72fd0c45d285d9515f0c (diff)
downloadvolse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.tar.gz
volse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.tar.bz2
volse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r--include/connections.php2
-rw-r--r--include/nav.php2
-rw-r--r--include/queue_fn.php12
-rw-r--r--include/zot.php4
4 files changed, 17 insertions, 3 deletions
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)
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'),
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;
}
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')