fix default cipher for comments and set it at the conversation level rather than the item level.

This commit is contained in:
friendica
2013-11-14 22:54:16 -08:00
parent fa79085bd5
commit 2fe6aef8bc
3 changed files with 11 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ class Item extends BaseObject {
private $threaded = false;
private $visiting = false;
private $channel = null;
private $cipher = 'aes256';
public function __construct($data) {
$a = $this->get_app();
@@ -35,11 +35,6 @@ class Item extends BaseObject {
$this->data = $data;
$this->toplevel = ($this->get_id() == $this->get_data_value('parent'));
$cipher = get_pconfig($x['profile_uid'],'system','default_cipher');
if($cipher)
$this->cipher = $cipher;
// Prepare the children
if(count($data['children'])) {
foreach($data['children'] as $item) {
@@ -545,7 +540,7 @@ class Item extends BaseObject {
'$indent' => $indent,
'$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $this->cipher,
'$cipher' => $conv->get_cipher(),
'$sourceapp' => get_app()->sourcename
));