aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Suggest.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-06 14:08:15 +0000
committerMario <mario@mariovavti.com>2018-10-06 16:09:05 +0200
commit98ee99071cf5556a323ae7f7bffd341fc03f7a6d (patch)
tree287932ed3eaa721363974fddbe27ba4227dffc41 /Zotlabs/Module/Suggest.php
parent97acfd23fb3cfaba4ce388a5b21b98d136282ba6 (diff)
downloadvolse-hubzilla-98ee99071cf5556a323ae7f7bffd341fc03f7a6d.tar.gz
volse-hubzilla-98ee99071cf5556a323ae7f7bffd341fc03f7a6d.tar.bz2
volse-hubzilla-98ee99071cf5556a323ae7f7bffd341fc03f7a6d.zip
pubstream app
(cherry picked from commit b8991750c5d36714100d20595da6a33149bd7d5d)
Diffstat (limited to 'Zotlabs/Module/Suggest.php')
-rw-r--r--Zotlabs/Module/Suggest.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/Zotlabs/Module/Suggest.php b/Zotlabs/Module/Suggest.php
index f79e4e245..18961214e 100644
--- a/Zotlabs/Module/Suggest.php
+++ b/Zotlabs/Module/Suggest.php
@@ -1,15 +1,20 @@
<?php
namespace Zotlabs\Module;
+use App;
+use Zotlabs\Lib\Apps;
+
require_once('include/socgraph.php');
require_once('include/contact_widgets.php');
-
class Suggest extends \Zotlabs\Web\Controller {
function init() {
if(! local_channel())
return;
+
+ if(! Apps::system_app_installed(local_channel(), 'Suggest Channels'))
+ return;
if(x($_GET,'ignore')) {
q("insert into xign ( uid, xchan ) values ( %d, '%s' ) ",
@@ -22,13 +27,23 @@ class Suggest extends \Zotlabs\Web\Controller {
function get() {
-
- $o = '';
+
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
+ if(! Apps::system_app_installed(local_channel(), 'Suggest Channels')) {
+ //Do not display any associated widgets at this point
+ App::$pdl = '';
+
+ $o = '<b>' . t('Suggest Channels App') . ' (' . t('Not Installed') . '):</b><br>';
+ $o .= t('Suggestions for channels in the $Projectname network you might be interested in');
+ return $o;
+ }
+
+ $o = '';
+
nav_set_selected('Suggest Channels');
$_SESSION['return_url'] = z_root() . '/' . \App::$cmd;