From e25a38788705310787df4115a14cf97bb4131145 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Jun 2013 22:29:32 -0700 Subject: more issues related to Tony's re-install --- mod/chanview.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/chanview.php b/mod/chanview.php index 8de59b92e..4f7638846 100644 --- a/mod/chanview.php +++ b/mod/chanview.php @@ -29,7 +29,11 @@ function chanview_content(&$a) { ); } elseif($_REQUEST['url']) { - $r = q("select * from xchan where xchan_url = '%s' limit 1", + + // if somebody re-installed they will have more than one xchan, use the most recent name date as this is + // the most useful consistently ascending table item we have. + + $r = q("select * from xchan where xchan_url = '%s' order by xchan_name_date desc limit 1", dbesc($_REQUEST['url']) ); } -- cgit v1.2.3