aboutsummaryrefslogtreecommitdiffstats
path: root/mod/knownhubs.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/knownhubs.php')
-rw-r--r--mod/knownhubs.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/knownhubs.php b/mod/knownhubs.php
new file mode 100644
index 000000000..9993d8e50
--- /dev/null
+++ b/mod/knownhubs.php
@@ -0,0 +1,22 @@
+<?php
+
+function knownhubs_init(&$a) {
+
+ if ($a->argv[1]=="json"){
+ $known_hubs = array();
+ $r = q("SELECT s.site_url FROM site as s group by s.site_url");
+
+ if(count($r)) {
+ foreach($r as $rr) {
+ $known_hubs[] = $rr['site_url'];
+ }
+ }
+ sort($known_hubs);
+
+ $data = Array(
+ 'knownhubs' => $known_hubs,
+ );
+ json_return_and_die($data);
+ }
+
+}