ability to use other ciphers

This commit is contained in:
friendica 2013-11-11 18:42:49 -08:00
parent 58e0d58489
commit a7c53d470b
2 changed files with 6 additions and 1 deletions

View File

@ -1079,6 +1079,10 @@ function status_editor($a,$x,$popup=false) {
if(x($x,'nopreview')) if(x($x,'nopreview'))
$preview = ''; $preview = '';
$cipher = get_pconfig($x['profile_uid'],'system','default_cipher');
if(! $cipher)
$cipher = 'aes256';
call_hooks('jot_tool', $jotplugins); call_hooks('jot_tool', $jotplugins);
call_hooks('jot_networks', $jotnets); call_hooks('jot_networks', $jotnets);
@ -1136,6 +1140,7 @@ function status_editor($a,$x,$popup=false) {
'$expires' => t('Set expiration date'), '$expires' => t('Set expiration date'),
'$feature_encrypt' => ((feature_enabled($x['profile_uid'],'content_encrypt') && (! $webpage)) ? 'block' : 'none'), '$feature_encrypt' => ((feature_enabled($x['profile_uid'],'content_encrypt') && (! $webpage)) ? 'block' : 'none'),
'$encrypt' => t('Encrypt text'), '$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,
)); ));

View File

@ -55,7 +55,7 @@
<i id="profile-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="jotGetExpiry();return false;"></i> <i id="profile-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="jotGetExpiry();return false;"></i>
</div> </div>
<div id="profile-encrypt-wrapper" style="display: {{$feature_encrypt}};" > <div id="profile-encrypt-wrapper" style="display: {{$feature_encrypt}};" >
<i id="profile-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" onclick="red_encrypt('aes256','#profile-jot-text',$('#profile-jot-text').val());return false;"></i> <i id="profile-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;"></i>
</div> </div>