mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
25 lines
495 B
PHP
25 lines
495 B
PHP
|
<?php /** @file */
|
||
|
|
||
|
function notes_init(&$a) {
|
||
|
|
||
|
if(! local_channel())
|
||
|
return;
|
||
|
|
||
|
$ret = array('success' => true);
|
||
|
if($_REQUEST['note_text'] || $_REQUEST['note_text'] == '') {
|
||
|
$body = escape_tags($_REQUEST['note_text']);
|
||
|
set_pconfig(local_channel(),'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);
|
||
|
|
||
|
}
|