diff options
author | Andrew Manning <tamanning@zoho.com> | 2017-01-31 17:36:42 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2017-01-31 17:36:42 -0500 |
commit | d3d540a28b2dd0b4958d129cceeba162c271302b (patch) | |
tree | 172400257279ede716ce88983b8bb3b281aa8d84 /Zotlabs/Module | |
parent | fab103524ab2b171d36c6f3830da682b0768627f (diff) | |
parent | a6cbebe03c4c1ca66b4b55c340ebb1d369d93c3a (diff) | |
download | volse-hubzilla-d3d540a28b2dd0b4958d129cceeba162c271302b.tar.gz volse-hubzilla-d3d540a28b2dd0b4958d129cceeba162c271302b.tar.bz2 volse-hubzilla-d3d540a28b2dd0b4958d129cceeba162c271302b.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Admin/Queue.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Appman.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Fhublocs.php | 28 | ||||
-rw-r--r-- | Zotlabs/Module/Import.php | 33 |
4 files changed, 36 insertions, 30 deletions
diff --git a/Zotlabs/Module/Admin/Queue.php b/Zotlabs/Module/Admin/Queue.php index 4986de925..5a47413ee 100644 --- a/Zotlabs/Module/Admin/Queue.php +++ b/Zotlabs/Module/Admin/Queue.php @@ -15,7 +15,6 @@ class Queue { $expert = ((array_key_exists('expert',$_REQUEST)) ? intval($_REQUEST['expert']) : 0); if($_REQUEST['drophub']) { - require_once('hubloc.php'); hubloc_mark_as_down($_REQUEST['drophub']); remove_queue_by_posturl($_REQUEST['drophub']); } diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php index a7631758b..270301d34 100644 --- a/Zotlabs/Module/Appman.php +++ b/Zotlabs/Module/Appman.php @@ -62,6 +62,10 @@ class Appman extends \Zotlabs\Web\Controller { return; } + if($_POST['feature']) { + Zlib\Apps::app_feature(local_channel(),$papp); + } + if($_SESSION['return_url']) goaway(z_root() . '/' . $_SESSION['return_url']); diff --git a/Zotlabs/Module/Fhublocs.php b/Zotlabs/Module/Fhublocs.php index cdf323a41..42c119da3 100644 --- a/Zotlabs/Module/Fhublocs.php +++ b/Zotlabs/Module/Fhublocs.php @@ -56,19 +56,21 @@ class Fhublocs extends \Zotlabs\Web\Controller { // Create a verified hub location pointing to this site. - $h = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_primary, hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey, hubloc_network ) - values ( '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s' )", - dbesc($rr['channel_guid']), - dbesc($rr['channel_guid_sig']), - dbesc($rr['channel_hash']), - dbesc(channel_reddress($rr)), - intval($primary), - dbesc(z_root()), - dbesc(base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey']))), - dbesc(\App::get_hostname()), - dbesc(z_root() . '/post'), - dbesc($sitekey), - dbesc('zot') + + $h = hubloc_store_lowlevel( + [ + 'hubloc_guid' => $rr['channel_guid'], + 'hubloc_guid_sig' => $rr['channel_guid_sig'], + 'hubloc_hash' => $rr['channel_hash'], + 'hubloc_addr' => channel_reddress($rr), + 'hubloc_network' => 'zot', + 'hubloc_primary' => $primary, + 'hubloc_url' => z_root(), + 'hubloc_url_sig' => base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey'])), + 'hubloc_host' => \App::get_hostname(), + 'hubloc_callback' => z_root() . '/post', + 'hubloc_sitekey' => $sitekey + ] ); if($h) diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 6de7c85a2..52835c685 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -206,23 +206,24 @@ class Import extends \Zotlabs\Web\Controller { if($completed < 5) { // create new hubloc for the new channel at this site - - $r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_network, hubloc_primary, - hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey ) - values ( '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )", - dbesc($channel['channel_guid']), - dbesc($channel['channel_guid_sig']), - dbesc($channel['channel_hash']), - dbesc(channel_reddress($channel)), - dbesc('zot'), - intval(($seize) ? 1 : 0), - dbesc(z_root()), - dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))), - dbesc(\App::get_hostname()), - dbesc(z_root() . '/post'), - dbesc(get_config('system','pubkey')) + + $r = hubloc_store_lowlevel( + [ + 'hubloc_guid' => $channel['channel_guid'], + 'hubloc_guid_sig' => $channel['channel_guid_sig'], + 'hubloc_hash' => $channel['channel_hash'], + 'hubloc_addr' => channel_reddress($channel), + 'hubloc_network' => 'zot', + 'hubloc_primary' => (($seize) ? 1 : 0), + 'hubloc_url' => z_root(), + 'hubloc_url_sig' => base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey'])), + 'hubloc_host' => \App::get_hostname(), + 'hubloc_callback' => z_root() . '/post', + 'hubloc_sitekey' => get_config('system','pubkey'), + 'hubloc_updated' => datetime_convert() + ] ); - + // reset the original primary hubloc if it is being seized if($seize) { |