aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-12 11:27:36 +0000
committerMario <mario@mariovavti.com>2021-10-12 11:27:36 +0000
commit96c334e7303f15c7402c96531574a438f4ff8ad0 (patch)
treed4955850b640d0973389697ea4851e1b55963525 /Zotlabs
parent3e503ec3a35e4226a566c1986bf570afc7c8a53f (diff)
downloadvolse-hubzilla-96c334e7303f15c7402c96531574a438f4ff8ad0.tar.gz
volse-hubzilla-96c334e7303f15c7402c96531574a438f4ff8ad0.tar.bz2
volse-hubzilla-96c334e7303f15c7402c96531574a438f4ff8ad0.zip
bbcode for notes app
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Notes.php11
-rw-r--r--Zotlabs/Widget/Notes.php1
2 files changed, 11 insertions, 1 deletions
diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php
index 6e8e03f20..57b8f30db 100644
--- a/Zotlabs/Module/Notes.php
+++ b/Zotlabs/Module/Notes.php
@@ -19,7 +19,12 @@ class Notes extends Controller {
if(! Apps::system_app_installed(local_channel(), 'Notes'))
return EMPTY_STR;
- $ret = array('success' => true);
+ $ret = [
+ 'success' => false,
+ 'html' => ''
+ ];
+
+
if(array_key_exists('note_text',$_REQUEST)) {
$body = escape_tags($_REQUEST['note_text']);
@@ -33,6 +38,10 @@ class Notes extends Controller {
set_pconfig(local_channel(),'notes','text.bak',$old_text);
}
set_pconfig(local_channel(),'notes','text',$body);
+
+ $ret['html'] = bbcode($body);
+ $ret['success'] = true;
+
}
// push updates to channel clones
diff --git a/Zotlabs/Widget/Notes.php b/Zotlabs/Widget/Notes.php
index 05c1a0292..66c90ef7d 100644
--- a/Zotlabs/Widget/Notes.php
+++ b/Zotlabs/Widget/Notes.php
@@ -20,6 +20,7 @@ class Notes {
$o = replace_macros($tpl, array(
'$banner' => t('Notes'),
'$text' => $text,
+ '$html' => bbcode($text),
'$save' => t('Save'),
'$app' => ((isset($arr['app'])) ? true : false),
'$hidden' => ((isset($arr['hidden'])) ? true : false)