aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-15 10:48:51 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-15 10:48:51 +0200
commit0f9a8a43e4ab274e251240f6091a5bf87c2ac205 (patch)
treeb01af393ae3dd457aa15cec7e9eb01b6d7cafcbb /Zotlabs
parent7856f5882bceaf83d5df42e117c23badc89ad1a8 (diff)
downloadvolse-hubzilla-0f9a8a43e4ab274e251240f6091a5bf87c2ac205.tar.gz
volse-hubzilla-0f9a8a43e4ab274e251240f6091a5bf87c2ac205.tar.bz2
volse-hubzilla-0f9a8a43e4ab274e251240f6091a5bf87c2ac205.zip
appify invite
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Cdav.php3
-rw-r--r--Zotlabs/Module/Invite.php21
2 files changed, 19 insertions, 5 deletions
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php
index 69030b582..bff308dfa 100644
--- a/Zotlabs/Module/Cdav.php
+++ b/Zotlabs/Module/Cdav.php
@@ -3,13 +3,14 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Apps;
+use Zotlabs\Web\Controller;
require_once('include/event.php');
require_once('include/auth.php');
require_once('include/security.php');
-class Cdav extends \Zotlabs\Web\Controller {
+class Cdav extends Controller {
function init() {
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php
index 359f99b3e..0a79387ce 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() {
@@ -57,7 +61,7 @@ class Invite extends \Zotlabs\Web\Controller {
else
$nmessage = $message;
- $account = \App::get_account();
+ $account = App::get_account();
$res = z_mail(
[
@@ -95,6 +99,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 +140,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"),