aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-05-07 23:05:48 +0200
committerMario Vavti <mario@mariovavti.com>2016-05-07 23:05:48 +0200
commit75128e8f68e829ad9e3670dac82f075d9632dba4 (patch)
treed78696df4c56398ae0b3f2ca165b70e9d33211db /include
parentb08fc746d81e9e486988439ae9a51918e9f9ee37 (diff)
downloadvolse-hubzilla-75128e8f68e829ad9e3670dac82f075d9632dba4.tar.gz
volse-hubzilla-75128e8f68e829ad9e3670dac82f075d9632dba4.tar.bz2
volse-hubzilla-75128e8f68e829ad9e3670dac82f075d9632dba4.zip
make editblock use status_editor()
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/conversation.php b/include/conversation.php
index ea5be221f..32a613eab 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1138,25 +1138,22 @@ 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="' . $x['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'] . '" />';
- }
-
$layoutselect = '';
if(array_key_exists('layout', $x) && $x['layout']) {
if($x['layout'] === 'choose') {