diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-19 08:28:42 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-19 08:28:42 +0200 |
commit | 92b08f1f07a25976342dc885331ecb1531e256aa (patch) | |
tree | 4127afeee7d8a3b710863d9ad022fed2b82a8ebc /include | |
parent | 16dcbc1e674cef1d51dc0e81f91d7055350f9990 (diff) | |
parent | a81011333fc113006fbf49b561915532f6cd2509 (diff) | |
download | volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.gz volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.bz2 volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r-- | include/follow.php | 8 | ||||
-rw-r--r-- | include/network.php | 9 | ||||
-rw-r--r-- | include/queue_fn.php | 6 | ||||
-rw-r--r-- | include/taxonomy.php | 2 | ||||
-rw-r--r-- | include/text.php | 4 |
5 files changed, 18 insertions, 11 deletions
diff --git a/include/follow.php b/include/follow.php index a63fe66ea..d803afa3f 100644 --- a/include/follow.php +++ b/include/follow.php @@ -150,9 +150,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) // attempt network auto-discovery - $d = discover_by_webbie($url,$protocol); + $wf = discover_by_webbie($url,$protocol); - if((! $d) && ($is_http)) { + if((! $wf) && ($is_http)) { // try RSS discovery @@ -167,9 +167,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } } - if($d) { + if($wf || $d) { $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' limit 1", - dbesc($url), + dbesc(($wf) ? $wf : $url), dbesc($url) ); } diff --git a/include/network.php b/include/network.php index 897fbccd6..c41d87af0 100644 --- a/include/network.php +++ b/include/network.php @@ -1192,9 +1192,10 @@ function discover_by_webbie($webbie, $protocol = '') { logger('webfinger: ' . print_r($x,true), LOGGER_DATA, LOG_INFO); $arr = [ - 'address' => $webbie, - 'protocol' => $protocol, - 'success' => false, + 'address' => $webbie, + 'protocol' => $protocol, + 'success' => false, + 'xchan' => '', 'webfinger' => $x ]; /** @@ -1207,7 +1208,7 @@ function discover_by_webbie($webbie, $protocol = '') { */ call_hooks('discover_channel_webfinger', $arr); if($arr['success']) - return true; + return $arr['xchan']; return false; } diff --git a/include/queue_fn.php b/include/queue_fn.php index 798ac36db..f05bac5b0 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -95,6 +95,12 @@ function queue_set_delivered($id,$channel = 0) { function queue_insert($arr) { + // do not queue anything with no destination + + if(! (array_key_exists('posturl',$arr) && trim($arr['posturl']))) { + return false; + } + $x = q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_priority, outq_created, outq_updated, outq_scheduled, outq_notify, outq_msg ) values ( '%s', %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s' )", diff --git a/include/taxonomy.php b/include/taxonomy.php index f65cdd941..e8d33986f 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -338,7 +338,7 @@ function pub_tagadelic($net,$site,$limit,$recent,$safemode,$type) { else { $sys = get_sys_channel(); $uids = " and item.uid = " . intval($sys['channel_id']) . " "; - $sql_extra = item_permissions_sql($sys['channel_id']); + $sql_extra = " and item_private = 0 "; } if($recent) diff --git a/include/text.php b/include/text.php index bc44f22f3..55fc49560 100644 --- a/include/text.php +++ b/include/text.php @@ -531,7 +531,7 @@ function paginate(&$a) { } -function alt_pager(&$a, $i, $more = '', $less = '') { +function alt_pager($i, $more = '', $less = '') { if(! $more) $more = t('older'); @@ -2404,7 +2404,7 @@ function jindent($json) { */ function design_tools() { - $channel = App::get_channel(); + $channel = channelx_by_n(App::$profile['profile_uid']); $sys = false; if(App::$is_sys && is_site_admin()) { |