diff options
author | zotlabs <mike@macgirvin.com> | 2018-05-06 18:23:39 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-05-06 18:23:39 -0700 |
commit | a30934c563457c14606e2ec3194a3ec9713cdbba (patch) | |
tree | 88b03990ca23f555aa6f8c42c836d0b21cb1dbe3 | |
parent | 5e6f6e2c3eb9b4e0501472a7206d33c90b831c01 (diff) | |
download | volse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.tar.gz volse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.tar.bz2 volse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.zip |
ensure that feed xchans have a name
-rw-r--r-- | include/network.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php index 26ed24de2..b0bda1f9d 100644 --- a/include/network.php +++ b/include/network.php @@ -999,7 +999,7 @@ function discover_by_url($url, $arr = null) { return false; $network = (($arr['network']) ? $arr['network'] : 'unknown'); - $name = (($arr['name']) ? $arr['name'] : 'unknown'); + $name = (trim($arr['name']) ? trim($arr['name']) : 'unknown'); $photo = (($arr['photo']) ? $arr['photo'] : ''); $addr = (($arr['addr']) ? $arr['addr'] : ''); $guid = $url; @@ -1103,6 +1103,9 @@ function discover_by_url($url, $arr = null) { if(! $name) $name = notags($feed->get_description()); + if(! $name) + $name = 'unknown'; + $r = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($guid) ); |