aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Notes.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-10-04 19:20:10 -0700
committerzotlabs <mike@macgirvin.com>2018-10-04 19:20:10 -0700
commit3a0a611f15f2789099acf57c6ca93828f5edae46 (patch)
treed928cd86bc856ae80a95a9738fc8a96b8fa23e5b /Zotlabs/Widget/Notes.php
parentd33c331abd3ae500fc7cdac206ea647c4c71905e (diff)
parent1eaf6df842184743ee20ec69931be1ff7136f34e (diff)
downloadvolse-hubzilla-3a0a611f15f2789099acf57c6ca93828f5edae46.tar.gz
volse-hubzilla-3a0a611f15f2789099acf57c6ca93828f5edae46.tar.bz2
volse-hubzilla-3a0a611f15f2789099acf57c6ca93828f5edae46.zip
Merge branch 'dev'
Diffstat (limited to 'Zotlabs/Widget/Notes.php')
-rw-r--r--Zotlabs/Widget/Notes.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Widget/Notes.php b/Zotlabs/Widget/Notes.php
index 5c83a550f..238008d81 100644
--- a/Zotlabs/Widget/Notes.php
+++ b/Zotlabs/Widget/Notes.php
@@ -2,20 +2,26 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Apps;
+
class Notes {
function widget($arr) {
if(! local_channel())
- return '';
- if(! feature_enabled(local_channel(),'private_notes'))
- return '';
+ return EMPTY_STR;
+
+ if(! Apps::system_app_installed(local_channel(), 'Notes'))
+ return EMPTY_STR;
$text = get_pconfig(local_channel(),'notes','text');
- $o = replace_macros(get_markup_template('notes.tpl'), array(
+ $tpl = get_markup_template('notes.tpl');
+
+ $o = replace_macros($tpl, array(
'$banner' => t('Notes'),
'$text' => $text,
'$save' => t('Save'),
+ '$app' => ((isset($arr['app'])) ? true : false)
));
return $o;