aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-04-08 14:18:10 -0400
committerAndrew Manning <tamanning@zoho.com>2018-04-08 14:18:10 -0400
commit43cafcc761bc12f442c30ab952164736aa18f9d8 (patch)
tree52a890ff54a9a413460c38b61833139639e6d341 /include
parentbe6dcb5d0a96d3618c4d4d824bf94b0a6753fefc (diff)
downloadvolse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.tar.gz
volse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.tar.bz2
volse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.zip
Auto-save post and comment entry using localStorage in browser.
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 93f7e11a7..ce0467770 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1361,16 +1361,8 @@ function status_editor($a, $x, $popup = false) {
}
$sharebutton = (x($x,'button') ? $x['button'] : t('Share'));
- $content = ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : '');
- if(!$content) {
- $content = get_pconfig(local_channel(),'autosavetext_post','body');
- }
- $title = ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : '');
- if(!$title) {
- $title = get_pconfig(local_channel(),'autosavetext_post','title');
- }
- $placeholdtext = (x($x,'content_label') ? $x['content_label'] : $sharebutton);
-
+ $placeholdtext = (x($x,'content_label') ? $x['content_label'] : $sharebutton);
+
$o .= replace_macros($tpl, array(
'$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : App::$query_string),
'$action' => z_root() . '/item',
@@ -1402,14 +1394,14 @@ function status_editor($a, $x, $popup = false) {
'$feature_nocomment' => $feature_nocomment,
'$nocomment' => ((array_key_exists('item',$x)) ? $x['item']['item_nocomment'] : 0),
'$clearloc' => $clearloc,
- '$title' => $title,
+ '$title' => ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
'$placeholdertitle' => ((x($x, 'placeholdertitle')) ? $x['placeholdertitle'] : t('Title (optional)')),
'$catsenabled' => $catsenabled,
'$category' => ((x($x, 'category')) ? $x['category'] : ''),
'$placeholdercategory' => t('Categories (optional, comma-separated list)'),
'$permset' => t('Permission settings'),
'$ptyp' => ((x($x, 'ptyp')) ? $x['ptyp'] : ''),
- '$content' => $content,
+ '$content' => ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : ''),
'$attachment' => ((x($x, 'attachment')) ? $x['attachment'] : ''),
'$post_id' => ((x($x, 'post_id')) ? $x['post_id'] : ''),
'$defloc' => $x['default_location'],