diff options
author | friendica <info@friendica.com> | 2014-07-14 01:38:16 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-07-14 01:38:16 -0700 |
commit | 233e4e13636edd857ded7393555feb4bf198eed3 (patch) | |
tree | 27c06018d534ff5e411a8aff4831a513d92801a5 /include/hubloc.php | |
parent | 17bd39fcd4b28e6475a8a349f136c788202eaff4 (diff) | |
download | volse-hubzilla-233e4e13636edd857ded7393555feb4bf198eed3.tar.gz volse-hubzilla-233e4e13636edd857ded7393555feb4bf198eed3.tar.bz2 volse-hubzilla-233e4e13636edd857ded7393555feb4bf198eed3.zip |
remove some code duplication
Diffstat (limited to 'include/hubloc.php')
-rw-r--r-- | include/hubloc.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hubloc.php b/include/hubloc.php index 35d9dbeb1..566875ce9 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -1,5 +1,17 @@ <?php /** @file */ +function is_matrix_url($url) { + $m = @parse_url($url); + if($m['host']) { + $r = q("select hubloc_url from hubloc where hubloc_host = '%s' limit 1", + dbesc($m['host']) + ); + if($r) + return true; + } + return false; +} + function prune_hub_reinstalls() { |