aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-14 15:41:25 -0800
committerfriendica <info@friendica.com>2013-11-14 15:41:25 -0800
commit592c24e162400f87075c6cdc44b795cdb94da836 (patch)
treee1da8b6084931e168118bc8250539282dd2b0154 /include
parent33f570a18784a2ff9069954cda2a0c531a415a24 (diff)
downloadvolse-hubzilla-592c24e162400f87075c6cdc44b795cdb94da836.tar.gz
volse-hubzilla-592c24e162400f87075c6cdc44b795cdb94da836.tar.bz2
volse-hubzilla-592c24e162400f87075c6cdc44b795cdb94da836.zip
e2ee in comments and a bit of cleanup so not every theme has to define how to insert bbcode, only if they're doing something special (e.g. this is how to implement a javascript plugin :-)), and I got rid of the predefined http:// in the bbcode for urls. You're almost always pasting a url which already has that bit and it just creates an extra step.
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php9
-rw-r--r--include/conversation.php3
2 files changed, 9 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 818f8c0b2..6dbb38564 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -27,6 +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();
@@ -34,6 +35,10 @@ 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'])) {
@@ -538,7 +543,11 @@ class Item extends BaseObject {
'$edvideo' => t('Video'),
'$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
'$indent' => $indent,
+ '$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false),
+ '$encrypt' => t('Encrypt text'),
+ '$cipher' => $this->cipher,
'$sourceapp' => get_app()->sourcename
+
));
return $comment_box;
diff --git a/include/conversation.php b/include/conversation.php
index 59ca24d41..e2a4a0723 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -532,9 +532,6 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
$items = $cb['items'];
- $cmnt_tpl = get_markup_template('comment_item.tpl');
- $hide_comments_tpl = get_markup_template('hide_comments.tpl');
-
$alike = array();
$dlike = array();