From 2bb3369ae20edeeb275167027bb4397dc73f5abc Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 6 Dec 2012 19:47:56 -0800 Subject: lookup channels in local xchan table even if provided an unknown url - this will show their pseudo vcard and connect button if they've ever been seen on this site before. --- mod/chanview.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/chanview.php b/mod/chanview.php index abc7fc216..42e5e1ed9 100644 --- a/mod/chanview.php +++ b/mod/chanview.php @@ -22,7 +22,11 @@ function chanview_content(&$a) { ); } elseif($_REQUEST['url']) { - $r = array(array('xchan_url' => $_REQUEST['url'])); + $r = q("select * from xchan where xchan_url = '%s' limit 1", + dbesc($_REQUEST['url']) + ); + if(! $r) + $r = array(array('xchan_url' => $_REQUEST['url'])); } if($r) { $xchan = $r[0]; -- cgit v1.2.3