aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Mood.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-09-28 15:46:14 +0200
committerMax Kostikov <max@kostikov.co>2018-09-28 15:46:14 +0200
commit4a904fa3a8af1c101ede76657249fb7eb47faf60 (patch)
tree544509813fb68579ef2b556ce879a971d183269a /Zotlabs/Module/Mood.php
parentf5f6ec3d71acb3e0488386819d5060e59331ec23 (diff)
parentc13d7e29ef9676b0f0e4ae23aa52e203f4ad8895 (diff)
downloadvolse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.gz
volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.bz2
volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.zip
Merge branch 'patch-29' into 'dev'
Patch 29 See merge request Kostikov/core!3
Diffstat (limited to 'Zotlabs/Module/Mood.php')
-rw-r--r--Zotlabs/Module/Mood.php23
1 files changed, 20 insertions, 3 deletions
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');