aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-09 22:00:21 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-09 22:00:21 -0400
commit0b8a7f1bd03edb2bb18eb050fcb0b482d0e231be (patch)
tree2e4f069d66885c5ca5b77154e9dd5a43ec004ff5 /include/conversation.php
parent9c8cf7d43372aeea4d8a450e7cb17d7a24b64d5f (diff)
parentea1173f8f632151d02c71fe6004c6a64d014e80a (diff)
downloadvolse-hubzilla-0b8a7f1bd03edb2bb18eb050fcb0b482d0e231be.tar.gz
volse-hubzilla-0b8a7f1bd03edb2bb18eb050fcb0b482d0e231be.tar.bz2
volse-hubzilla-0b8a7f1bd03edb2bb18eb050fcb0b482d0e231be.zip
Merge remote-tracking branch 'upstream/dev' into plugin-repo
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php38
1 files changed, 17 insertions, 21 deletions
diff --git a/include/conversation.php b/include/conversation.php
index ea5be221f..8be0557e7 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1138,33 +1138,29 @@ function status_editor($a, $x, $popup = false) {
if(x($x, 'hide_location'))
$geotag = $setloc = $clearloc = '';
- $weblink = t('Insert web link');
+ $mimetype = ((x($x,'mimetype')) ? $x['mimetype'] : 'text/bbcode');
+
+ $mimeselect = ((x($x,'mimeselect')) ? $x['mimeselect'] : false);
+ if($mimeselect)
+ $mimeselect = mimetype_select($x['profile_uid'], $mimetype);
+ else
+ $mimeselect = '<input type="hidden" name="mimetype" value="' . $mimetype . '" />';
+
+ $weblink = (($mimetype === 'text/bbcode') ? t('Insert web link') : false);
if(x($x, 'hide_weblink'))
- $weblink = '';
+ $weblink = false;
- $writefiles = perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage');
+ $writefiles = (($mimetype === 'text/bbcode') ? perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage') : false);
if(x($x, 'hide_attach'))
$writefiles = false;
- $mimeselect = '';
- if(array_key_exists('mimetype', $x) && $x['mimetype']) {
- if($x['mimetype'] != 'text/bbcode')
- $plaintext = true;
- if($x['mimetype'] === 'choose') {
- $mimeselect = mimetype_select($x['profile_uid']);
- }
- else
- $mimeselect = '<input type="hidden" name="mimetype" value="' . $x['mimetype'] . '" />';
- }
+ $layout = ((x($x,'layout')) ? $x['layout'] : '');
- $layoutselect = '';
- if(array_key_exists('layout', $x) && $x['layout']) {
- if($x['layout'] === 'choose') {
- $layoutselect = layout_select($x['profile_uid']);
- }
- else
- $layoutselect = '<input type="hidden" name="layout_mid" value="' . $x['layout'] . '" />';
- }
+ $layoutselect = ((x($x,'layoutselect')) ? $x['layoutselect'] : false);
+ if($layoutselect)
+ $layoutselect = layout_select($x['profile_uid'], $layout);
+ else
+ $layoutselect = '<input type="hidden" name="layout_mid" value="' . $layout . '" />';
if(array_key_exists('channel_select',$x) && $x['channel_select']) {
require_once('include/identity.php');