diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-09-15 11:00:41 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-09-15 11:00:41 +0200 |
commit | 299eb469f8d4d674c49e41162d28f237c0d7294f (patch) | |
tree | e7451aec070da5242fdbf7bec12ce43c6b368960 | |
parent | 0f9a8a43e4ab274e251240f6091a5bf87c2ac205 (diff) | |
download | volse-hubzilla-299eb469f8d4d674c49e41162d28f237c0d7294f.tar.gz volse-hubzilla-299eb469f8d4d674c49e41162d28f237c0d7294f.tar.bz2 volse-hubzilla-299eb469f8d4d674c49e41162d28f237c0d7294f.zip |
appify mood
-rw-r--r-- | Zotlabs/Module/Invite.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Mood.php | 23 |
2 files changed, 24 insertions, 3 deletions
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php index 0a79387ce..234802746 100644 --- a/Zotlabs/Module/Invite.php +++ b/Zotlabs/Module/Invite.php @@ -21,6 +21,10 @@ class Invite extends Controller { notice( t('Permission denied.') . EOL); return; } + + if(! Apps::system_app_installed(local_channel(), 'Invite')) { + return; + } check_form_security_token_redirectOnErr('/', 'send_invite'); diff --git a/Zotlabs/Module/Mood.php b/Zotlabs/Module/Mood.php index ad29ec7e8..cceef5ffa 100644 --- a/Zotlabs/Module/Mood.php +++ b/Zotlabs/Module/Mood.php @@ -1,21 +1,29 @@ <?php namespace Zotlabs\Module; +use App; +use Zotlabs\Lib\Apps; +use Zotlabs\Web\Controller; + require_once('include/security.php'); require_once('include/bbcode.php'); require_once('include/items.php'); -class Mood extends \Zotlabs\Web\Controller { +class Mood extends Controller { function init() { if(! local_channel()) return; + + if(! Apps::system_app_installed(local_channel(), 'Mood')) { + return; + } $uid = local_channel(); - $channel = \App::get_channel(); + $channel = App::get_channel(); $verb = notags(trim($_GET['verb'])); if(! $verb) @@ -60,7 +68,7 @@ class Mood extends \Zotlabs\Web\Controller { $deny_gid = $channel['channel_deny_gid']; } - $poster = \App::get_observer(); + $poster = App::get_observer(); $mid = item_message_id(); @@ -117,6 +125,15 @@ class Mood extends \Zotlabs\Web\Controller { return; } + if(! Apps::system_app_installed(local_channel(), 'Mood')) { + //Do not display any associated widgets at this point + App::$pdl = ''; + + $o = '<b>Mood App (Not Installed):</b><br>'; + $o .= t('Set your current mood and tell your friends'); + return $o; + } + nav_set_selected('Mood'); $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0'); |