diff options
author | zotlabs <mike@macgirvin.com> | 2018-10-08 20:58:16 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-10-08 20:58:16 -0700 |
commit | 2cb52f88755aac62f208463e4754153bbf249c67 (patch) | |
tree | 01746da751c10a67f6064d2d1fd79af33dc73685 /Zotlabs/Module/Randprof.php | |
parent | 2c797807cd63850055fc65e445a605aee106530a (diff) | |
parent | 37b94bf5fa71835fe50af6f862e124e24b5db4b4 (diff) | |
download | volse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.tar.gz volse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.tar.bz2 volse-hubzilla-2cb52f88755aac62f208463e4754153bbf249c67.zip |
Merge branch 'dev'
Diffstat (limited to 'Zotlabs/Module/Randprof.php')
-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; + } + } + + } } |