diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-10-06 13:27:46 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-10-06 15:28:17 +0200 |
commit | 97acfd23fb3cfaba4ce388a5b21b98d136282ba6 (patch) | |
tree | a1b96d7449864b378e6bc8fea63a86f7362de7d7 /Zotlabs | |
parent | af05fa3e851b476d96207cb8162dbee1bc1085b5 (diff) | |
download | volse-hubzilla-97acfd23fb3cfaba4ce388a5b21b98d136282ba6.tar.gz volse-hubzilla-97acfd23fb3cfaba4ce388a5b21b98d136282ba6.tar.bz2 volse-hubzilla-97acfd23fb3cfaba4ce388a5b21b98d136282ba6.zip |
randprof app
(cherry picked from commit 18726737d0116f13ec83cb2c1094a36d08980b7d)
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Randprof.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Zotlabs/Module/Randprof.php b/Zotlabs/Module/Randprof.php index 94ec095cb..c38b07ead 100644 --- a/Zotlabs/Module/Randprof.php +++ b/Zotlabs/Module/Randprof.php @@ -1,11 +1,17 @@ <?php namespace Zotlabs\Module; - +use App; +use Zotlabs\Lib\Apps; class Randprof extends \Zotlabs\Web\Controller { function init() { + if(local_channel()) { + if(! Apps::system_app_installed(local_channel(), 'Random Channel')) + return; + } + $x = random_profile(); if($x) goaway(chanlink_hash($x)); @@ -13,5 +19,19 @@ class Randprof extends \Zotlabs\Web\Controller { /** FIXME this doesn't work at the moment as a fallback */ goaway(z_root() . '/profile'); } + + function get() { + if(local_channel()) { + if(! Apps::system_app_installed(local_channel(), 'Random Channel')) { + //Do not display any associated widgets at this point + App::$pdl = ''; + + $o = '<b>' . t('Random Channel App') . ' (' . t('Not Installed') . '):</b><br>'; + $o .= t('Visit a random channel in the $Projectname network'); + return $o; + } + } + + } } |