aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-09 15:27:46 -0800
committerfriendica <info@friendica.com>2013-12-09 15:27:46 -0800
commitf85cba10eb3d976d715c7a80fe69fe15d9dc468c (patch)
tree45280620e820e72a9a1876fada5333f4d8b5d35c /mod
parentb5f73d01c57bce1758eb7abd3ede327218be5404 (diff)
downloadvolse-hubzilla-f85cba10eb3d976d715c7a80fe69fe15d9dc468c.tar.gz
volse-hubzilla-f85cba10eb3d976d715c7a80fe69fe15d9dc468c.tar.bz2
volse-hubzilla-f85cba10eb3d976d715c7a80fe69fe15d9dc468c.zip
notes widget
Diffstat (limited to 'mod')
-rw-r--r--mod/network.php2
-rw-r--r--mod/notes.php16
2 files changed, 17 insertions, 1 deletions
diff --git a/mod/network.php b/mod/network.php
index efb3116ae..13092d47d 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -54,7 +54,7 @@ function network_init(&$a) {
$a->set_widget('suggestions',widget_suggestions(array()));
$a->set_widget('savedsearch',saved_searches($search));
$a->set_widget('filer',fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : '')));
-
+ $a->set_widget('notes',widget_notes(array()));
if($search) {
if(strpos($search,'@') === 0) {
diff --git a/mod/notes.php b/mod/notes.php
new file mode 100644
index 000000000..ce3460aa4
--- /dev/null
+++ b/mod/notes.php
@@ -0,0 +1,16 @@
+<?php /** @file */
+
+function notes_init(&$a) {
+ if(! local_user())
+ return;
+ logger('mod_notes: ' . print_r($_REQUEST,true));
+
+ $ret = array('success' => true);
+ if($_REQUEST['note_text']) {
+ $body = escape_tags($_REQUEST['note_text']);
+ set_pconfig(local_user(),'notes','text',$body);
+ }
+ logger('notes saved.');
+ json_return_and_die($ret);
+
+} \ No newline at end of file