From e68185fc05fadf71ee961513fc3dbdfafcfb86de Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 11 Sep 2014 18:11:07 -0700 Subject: don't allow an xchan to be imported with an empty name. To avoid translation issues we'll just make it '-'. --- include/zot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index f5099df8c..644d20ec2 100644 --- a/include/zot.php +++ b/include/zot.php @@ -722,7 +722,7 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) { $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_follow = '%s', xchan_connpage = '%s', xchan_flags = %d, xchan_addr = '%s', xchan_url = '%s' where xchan_hash = '%s' limit 1", - dbesc($arr['name']), + dbesc(($arr['name']) ? $arr['name'] : '-'), dbesc($arr['name_updated']), dbesc($arr['connections_url']), dbesc($arr['follow_url']), @@ -772,7 +772,7 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) { dbesc($arr['connections_url']), dbesc($arr['follow_url']), dbesc($arr['connect_url']), - dbesc($arr['name']), + dbesc(($arr['name']) ? $arr['name'] : '-'), dbesc('zot'), dbesc($arr['photo_updated']), dbesc($arr['name_updated']), -- cgit v1.2.3