diff options
Diffstat (limited to 'mod/notes.php')
-rw-r--r-- | mod/notes.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mod/notes.php b/mod/notes.php new file mode 100644 index 000000000..84f8a7093 --- /dev/null +++ b/mod/notes.php @@ -0,0 +1,24 @@ +<?php /** @file */ + +function notes_init(&$a) { + + if(! local_user()) + return; + + $ret = array('success' => true); + if($_REQUEST['note_text'] || $_REQUEST['note_text'] == '') { + $body = escape_tags($_REQUEST['note_text']); + set_pconfig(local_user(),'notes','text',$body); + } + + // push updates to channel clones + + if((argc() > 1) && (argv(1) === 'sync')) { + require_once('include/zot.php'); + build_sync_packet(); + } + + logger('notes saved.', LOGGER_DEBUG); + json_return_and_die($ret); + +} |