aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/chanview.php6
1 files changed, 5 insertions, 1 deletions
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'])
);
}