Merge branch 'dev' into 'dev'

possible for DB to return hublocs with no sitekey

See merge request hubzilla/core!1713
This commit is contained in:
Max Kostikov 2019-08-22 20:29:53 +02:00
commit 35790c584b
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ class Queue {
$host_crypto = null;
if($channel && $base) {
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {

View File

@ -286,7 +286,7 @@ function queue_deliver($outq, $immediate = false) {
$host_crypto = null;
if($channel && $base) {
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {