E2EE on private mail (also fixed autocomplete results dropdown for recipient which was positioned below the navbar instead of next to the recipient input box)
This commit is contained in:
parent
412ebdade7
commit
ee629534d5
@ -76,12 +76,12 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
|
||||
|
||||
$match = null;
|
||||
$images = null;
|
||||
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match))
|
||||
if(preg_match_all("/\[img\](.*?)\[\/img\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match))
|
||||
$images = $match[1];
|
||||
|
||||
$match = false;
|
||||
|
||||
if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match))
|
||||
if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match))
|
||||
$attaches = $match[1];
|
||||
|
||||
$attachments = '';
|
||||
|
@ -212,6 +212,12 @@ function message_content(&$a) {
|
||||
$channel = $a->get_channel();
|
||||
head_set_icon($channel['xchan_photo_s']);
|
||||
|
||||
$cipher = get_pconfig(local_user(),'system','default_cipher');
|
||||
if(! $cipher)
|
||||
$cipher = 'aes256';
|
||||
|
||||
|
||||
|
||||
$tpl = get_markup_template('mail_head.tpl');
|
||||
$header = replace_macros($tpl, array(
|
||||
'$messages' => t('Messages'),
|
||||
@ -328,6 +334,11 @@ function message_content(&$a) {
|
||||
'$defexpire' => '',
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
|
||||
'$expires' => t('Set expiration date'),
|
||||
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
|
||||
'$encrypt' => t('Encrypt text'),
|
||||
'$cipher' => $cipher,
|
||||
|
||||
|
||||
));
|
||||
|
||||
return $o;
|
||||
@ -506,6 +517,10 @@ function message_content(&$a) {
|
||||
'$defexpire' => '',
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
|
||||
'$expires' => t('Set expiration date'),
|
||||
'$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
|
||||
'$encrypt' => t('Encrypt text'),
|
||||
'$cipher' => $cipher,
|
||||
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
@ -1721,6 +1721,7 @@ tr.mceLast {
|
||||
#prvmail-attach-wrapper,
|
||||
#prvmail-link-wrapper,
|
||||
#prvmail-expire-wrapper,
|
||||
#prvmail-encrypt-wrapper,
|
||||
#prvmail-rotator-wrapper {
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
@ -2897,11 +2898,6 @@ div.jGrowl div.info {
|
||||
|
||||
}
|
||||
|
||||
.autocomplete-w1 {
|
||||
position: fixed;
|
||||
top: 24px;
|
||||
}
|
||||
|
||||
.autocomplete {
|
||||
color: $font_colour;
|
||||
border: 1px solid $nav_bg_1;
|
||||
|
@ -15,6 +15,7 @@
|
||||
{{/if}}
|
||||
|
||||
<input type="hidden" id="inp-prvmail-expires" name="expires" value="{{$defexpire}}" />
|
||||
<input type="hidden" name="media_str" id="jot-media" value="" />
|
||||
|
||||
<div id="prvmail-subject-label">{{$subject}}</div>
|
||||
<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="{{$subjtxt}}" {{$readonly}} tabindex="11" />
|
||||
@ -40,7 +41,9 @@
|
||||
<div id="prvmail-expire-wrapper" style="display: {{$feature_expire}};" >
|
||||
<i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="prvmailGetExpiry();return false;"></i>
|
||||
</div>
|
||||
|
||||
<div id="prvmail-encrypt-wrapper" style="display: {{$feature_encrypt}};" >
|
||||
<i id="prvmail-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val());return false;"></i>
|
||||
</div>
|
||||
|
||||
<div id="prvmail-rotator-wrapper" >
|
||||
<img id="prvmail-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
|
||||
|
Reference in New Issue
Block a user