diff options
author | zotlabs <mike@macgirvin.com> | 2018-09-16 19:05:12 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-09-16 19:05:12 -0700 |
commit | 27617efbfbeb2c7a608093a5dfd58679a8393de0 (patch) | |
tree | b99dc3609e2caedc1598659436e26da63420d95a /Zotlabs/Module/Invite.php | |
parent | 6ab12597f508294d37fddeca789033c1729600d8 (diff) | |
parent | 07cd1d1272bd301c2f41f5579697754ccbbf5ae3 (diff) | |
download | volse-hubzilla-27617efbfbeb2c7a608093a5dfd58679a8393de0.tar.gz volse-hubzilla-27617efbfbeb2c7a608093a5dfd58679a8393de0.tar.bz2 volse-hubzilla-27617efbfbeb2c7a608093a5dfd58679a8393de0.zip |
Merge branch 'dev'
Diffstat (limited to 'Zotlabs/Module/Invite.php')
-rw-r--r-- | Zotlabs/Module/Invite.php | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php index 359f99b3e..234802746 100644 --- a/Zotlabs/Module/Invite.php +++ b/Zotlabs/Module/Invite.php @@ -1,6 +1,10 @@ <?php namespace Zotlabs\Module; +use App; +use Zotlabs\Lib\Apps; +use Zotlabs\Web\Controller; + /** * module: invite.php * @@ -9,7 +13,7 @@ namespace Zotlabs\Module; */ -class Invite extends \Zotlabs\Web\Controller { +class Invite extends Controller { function post() { @@ -17,6 +21,10 @@ class Invite extends \Zotlabs\Web\Controller { notice( t('Permission denied.') . EOL); return; } + + if(! Apps::system_app_installed(local_channel(), 'Invite')) { + return; + } check_form_security_token_redirectOnErr('/', 'send_invite'); @@ -57,7 +65,7 @@ class Invite extends \Zotlabs\Web\Controller { else $nmessage = $message; - $account = \App::get_account(); + $account = App::get_account(); $res = z_mail( [ @@ -95,6 +103,15 @@ class Invite extends \Zotlabs\Web\Controller { return; } + if(! Apps::system_app_installed(local_channel(), 'Invite')) { + //Do not display any associated widgets at this point + App::$pdl = ''; + + $o = '<b>Invite App (Not Installed):</b><br>'; + $o .= t('Send email invitations to join this network'); + return $o; + } + nav_set_selected('Invite'); $tpl = get_markup_template('invite.tpl'); @@ -127,11 +144,11 @@ class Invite extends \Zotlabs\Web\Controller { } } - $ob = \App::get_observer(); + $ob = App::get_observer(); if(! $ob) return $o; - $channel = \App::get_channel(); + $channel = App::get_channel(); $o = replace_macros($tpl, array( '$form_security_token' => get_form_security_token("send_invite"), |