diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 34 | ||||
-rwxr-xr-x | include/items.php | 4 |
2 files changed, 22 insertions, 16 deletions
diff --git a/include/conversation.php b/include/conversation.php index ea5be221f..48cb0af6b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1138,25 +1138,31 @@ 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'] : 'default'); + $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 . '" />'; + +/* $layoutselect = ''; if(array_key_exists('layout', $x) && $x['layout']) { if($x['layout'] === 'choose') { @@ -1165,7 +1171,7 @@ function status_editor($a, $x, $popup = false) { else $layoutselect = '<input type="hidden" name="layout_mid" value="' . $x['layout'] . '" />'; } - +*/ if(array_key_exists('channel_select',$x) && $x['channel_select']) { require_once('include/identity.php'); $id_select = identity_selector(); diff --git a/include/items.php b/include/items.php index b3c9403e0..bef04237b 100755 --- a/include/items.php +++ b/include/items.php @@ -2223,7 +2223,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) { dbesc($arr['layout_mid']), intval($arr['uid']) ); - if((! $l) || (! ($l[0]['item_type'] != ITEM_TYPE_PDL))) + if((! $l) || ($l[0]['item_type'] != ITEM_TYPE_PDL)) unset($arr['layout_mid']); } @@ -5664,4 +5664,4 @@ function sync_an_item($channel_id,$item_id) { ); build_sync_packet($channel_d,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid)); } -}
\ No newline at end of file +} |