mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 10:35:14 +00:00
32 lines
481 B
PHP
32 lines
481 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
namespace Zotlabs\Module;
|
||
|
|
||
|
|
||
|
use Zotlabs\Web\Controller;
|
||
|
|
||
|
|
||
|
|
||
|
class Q extends Controller {
|
||
|
|
||
|
function init() {
|
||
|
|
||
|
$ret = [ 'success' => false ];
|
||
|
|
||
|
$h = argv(1);
|
||
|
if(! $h) {
|
||
|
json_return_and_die($ret);
|
||
|
}
|
||
|
|
||
|
$r = q("select * from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' and site_dead = 0",
|
||
|
dbesc($h)
|
||
|
);
|
||
|
if($r) {
|
||
|
$ret['success'] = true;
|
||
|
$ret['results'] = ids_to_array($r,'hubloc_id_url');
|
||
|
}
|
||
|
json_return_and_die($ret);
|
||
|
}
|
||
|
|
||
|
}
|