aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Import/Importer.php4
-rw-r--r--include/Import/refimport.php2
-rw-r--r--include/RedDAV/RedBasicAuth.php2
-rw-r--r--include/RedDAV/RedBrowser.php2
-rw-r--r--include/RedDAV/RedDirectory.php2
-rw-r--r--include/RedDAV/RedFile.php4
-rw-r--r--include/api.php2
-rw-r--r--include/bb2diaspora.php2
-rw-r--r--include/conversation.php9
-rwxr-xr-xinclude/diaspora.php14
-rw-r--r--include/enotify.php4
-rw-r--r--include/identity.php4
-rwxr-xr-xinclude/items.php65
-rw-r--r--include/reddav.php4
-rw-r--r--include/text.php6
-rw-r--r--include/zot.php2
16 files changed, 38 insertions, 90 deletions
diff --git a/include/Import/Importer.php b/include/Import/Importer.php
index 5e684cd8e..cddfac7b5 100644
--- a/include/Import/Importer.php
+++ b/include/Import/Importer.php
@@ -1,11 +1,11 @@
<?php /** @file */
-namespace RedMatrix\Import;
+namespace Hubzilla\Import;
/**
* @brief Class Import
*
- * @package RedMatrix\Import
+ * @package Hubzilla\Import
*/
class Import {
diff --git a/include/Import/refimport.php b/include/Import/refimport.php
index b9b6bf639..d248fb7df 100644
--- a/include/Import/refimport.php
+++ b/include/Import/refimport.php
@@ -205,7 +205,7 @@ function reflect_find_user($users,$name) {
function reflect_comment_store($channel,$post,$comment,$user) {
- // if the commenter was the channel owner, use their redmatrix xchan
+ // if the commenter was the channel owner, use their hubzilla xchan
if($comment['author'] === REFLECT_EXPORTUSERNAME && $comment['registered'])
$hash = $channel['xchan_hash'];
diff --git a/include/RedDAV/RedBasicAuth.php b/include/RedDAV/RedBasicAuth.php
index 19dd9a5f0..3c944a22d 100644
--- a/include/RedDAV/RedBasicAuth.php
+++ b/include/RedDAV/RedBasicAuth.php
@@ -1,6 +1,6 @@
<?php
-namespace RedMatrix\RedDAV;
+namespace Hubzilla\RedDAV;
use Sabre\DAV;
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php
index a0330d7cc..40d1ce0a1 100644
--- a/include/RedDAV/RedBrowser.php
+++ b/include/RedDAV/RedBrowser.php
@@ -1,6 +1,6 @@
<?php
-namespace RedMatrix\RedDAV;
+namespace Hubzilla\RedDAV;
use Sabre\DAV;
diff --git a/include/RedDAV/RedDirectory.php b/include/RedDAV/RedDirectory.php
index 922be378d..229e25835 100644
--- a/include/RedDAV/RedDirectory.php
+++ b/include/RedDAV/RedDirectory.php
@@ -1,6 +1,6 @@
<?php
-namespace RedMatrix\RedDAV;
+namespace Hubzilla\RedDAV;
use Sabre\DAV;
diff --git a/include/RedDAV/RedFile.php b/include/RedDAV/RedFile.php
index b7aa5473a..d15bfeb8e 100644
--- a/include/RedDAV/RedFile.php
+++ b/include/RedDAV/RedFile.php
@@ -1,6 +1,6 @@
<?php
-namespace RedMatrix\RedDAV;
+namespace Hubzilla\RedDAV;
use Sabre\DAV;
@@ -29,7 +29,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
private $data;
/**
* @see \Sabre\DAV\Auth\Backend\BackendInterface
- * @var \RedMatrix\RedDAV\RedBasicAuth
+ * @var \Hubzilla\RedDAV\RedBasicAuth
*/
private $auth;
/**
diff --git a/include/api.php b/include/api.php
index b9c4c45a4..2491e500b 100644
--- a/include/api.php
+++ b/include/api.php
@@ -1936,7 +1936,7 @@ require_once('include/items.php');
'broughtbyurl' => '', 'timezone' => 'UTC', 'closed' => $closed, 'inviteonly' => 'false',
'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl,
'shorturllength' => '30',
- 'redmatrix' => array(
+ 'hubzilla' => array(
'RED_PLATFORM' => RED_PLATFORM,
'RED_VERSION' => RED_VERSION,
'ZOT_REVISION' => ZOT_REVISION,
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 118e78639..3750fe3fd 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -450,7 +450,7 @@ function format_event_diaspora($ev) {
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM
- $o = t('Redmatrix event notification:') . "\n";
+ $o = t('Hubzilla event notification:') . "\n";
$o .= '**' . (($ev['summary']) ? bb2diaspora($ev['summary']) : bb2diaspora($ev['desc'])) . '**' . "\n";
diff --git a/include/conversation.php b/include/conversation.php
index fb012667e..e76101cbe 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -356,15 +356,6 @@ function localize_item(&$item){
}
}
*/
- // add sparkle links to appropriate permalinks
-
-// $x = stristr($item['plink'],'/display/');
-// if($x) {
-// $sparkle = false;
-// $y = best_link_url($item,$sparkle,true);
- // if($sparkle)
-// $item['plink'] = $y . '?f=&url=' . $item['plink'];
-// }
// if item body was obscured and we changed it, re-obscure it
// FIXME - we need a better filter than just the string 'data'; try and
diff --git a/include/diaspora.php b/include/diaspora.php
index 4aa525838..acdddd0ef 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -329,7 +329,7 @@ function find_diaspora_person_by_handle($handle) {
if(! $person) {
// try webfinger. Make sure to distinguish between diaspora,
- // redmatrix w/diaspora protocol and friendica w/diaspora protocol.
+ // hubzilla w/diaspora protocol and friendica w/diaspora protocol.
$result = discover_by_webbie($handle);
if($result) {
@@ -706,8 +706,8 @@ function diaspora_request($importer,$xml) {
$cnv = random_string();
$mid = random_string();
- $msg = t('You have started sharing with a Redmatrix premium channel.');
- $msg .= t('Redmatrix premium channels are not available for sharing with Diaspora members. This sharing request has been blocked.') . "\r";
+ $msg = t('You have started sharing with a Hubzilla premium channel.');
+ $msg .= t('Hubzilla premium channels are not available for sharing with Diaspora members. This sharing request has been blocked.') . "\r";
$msg .= t('Please do not reply to this message, as this channel is not sharing with you and any reply will not be seen by the recipient.') . "\r";
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
@@ -1523,7 +1523,7 @@ function diaspora_comment($importer,$xml,$msg) {
$key = get_config('system','pubkey');
$x = array('signer' => $diaspora_handle, 'body' => $text,
'signed_text' => $signed_data, 'signature' => base64_encode($author_signature));
- $datarray['diaspora_meta'] = json_encode(crypto_encapsulate(json_encode($x),$key));
+ $datarray['diaspora_meta'] = json_encode($x);
}
@@ -2137,7 +2137,7 @@ function diaspora_like($importer,$xml,$msg) {
$key = get_config('system','pubkey');
$x = array('signer' => $diaspora_handle, 'body' => $text,
'signed_text' => $signed_data, 'signature' => base64_encode($author_signature));
- $arr['diaspora_meta'] = json_encode(crypto_encapsulate(json_encode($x),$key));
+ $arr['diaspora_meta'] = json_encode($x);
}
$x = item_store($arr);
@@ -2458,7 +2458,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
'$handle' => xmlify($myaddr),
'$public' => $public,
'$created' => $created,
- '$provider' => (($item['app']) ? $item['app'] : 'redmatrix')
+ '$provider' => (($item['app']) ? $item['app'] : 'hubzilla')
));
} else {
$tpl = get_markup_template('diaspora_post.tpl');
@@ -2469,7 +2469,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
'$handle' => xmlify($myaddr),
'$public' => $public,
'$created' => $created,
- '$provider' => (($item['app']) ? $item['app'] : 'redmatrix')
+ '$provider' => (($item['app']) ? $item['app'] : 'hubzilla')
));
}
diff --git a/include/enotify.php b/include/enotify.php
index e801c3100..08ab8175d 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -55,8 +55,8 @@ function notification($params) {
push_lang($recip['account_language']); // should probably have a channel language
- $banner = t('Red Matrix Notification');
- $product = t('redmatrix'); // RED_PLATFORM;
+ $banner = t('Hubzilla Notification');
+ $product = t('hubzilla'); // RED_PLATFORM;
$siteurl = $a->get_baseurl(true);
$thanks = t('Thank You,');
$sitename = get_config('system','sitename');
diff --git a/include/identity.php b/include/identity.php
index 7884c04d2..fa2e27355 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1371,7 +1371,7 @@ function get_default_profile_photo($size = 175) {
}
/**
- * @brief Test whether a given identity is NOT a member of the Red Matrix.
+ * @brief Test whether a given identity is NOT a member of the Hubzilla.
*
* @param string $s;
* xchan_hash of the identity in question
@@ -1382,7 +1382,7 @@ function is_foreigner($s) {
}
/**
- * @brief Test whether a given identity is a member of the Red Matrix.
+ * @brief Test whether a given identity is a member of the Hubzilla.
*
* @param string $s;
* xchan_hash of the identity in question
diff --git a/include/items.php b/include/items.php
index 4e85bef37..42ff3cb8b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -417,14 +417,6 @@ function post_activity_item($arr) {
$arr['item_flags'] = $arr['item_flags'] | ITEM_VERIFIED;
}
}
-
- logger('Encrypting local storage');
- $key = get_config('system','pubkey');
- $arr['item_flags'] = $arr['item_flags'] | ITEM_OBSCURED;
- if($arr['title'])
- $arr['title'] = json_encode(crypto_encapsulate($arr['title'],$key));
- if($arr['body'])
- $arr['body'] = json_encode(crypto_encapsulate($arr['body'],$key));
}
$arr['mid'] = ((x($arr,'mid')) ? $arr['mid'] : item_message_id());
@@ -851,7 +843,7 @@ function get_item_elements($x) {
$arr['sig'] = (($x['signature']) ? htmlspecialchars($x['signature'], ENT_COMPAT,'UTF-8',false) : '');
- $arr['diaspora_meta'] = (($x['diaspora_signature']) ? json_encode(crypto_encapsulate($x['diaspora_signature'],$key)) : '');
+ $arr['diaspora_meta'] = (($x['diaspora_signature']) ? json_encode($x['diaspora_signature']) : '');
$arr['object'] = activity_sanitise($x['object']);
$arr['target'] = activity_sanitise($x['target']);
@@ -900,21 +892,6 @@ function get_item_elements($x) {
logger('get_item_elements: message verification failed.');
}
-
- // if it's a private post, encrypt it in the DB.
- // We have to do that here because we need to cleanse the input and prevent bad stuff from getting in,
- // and we need plaintext to do that.
-
-
- if(intval($arr['item_private'])) {
- $arr['item_flags'] = $arr['item_flags'] | ITEM_OBSCURED;
- if($arr['title'])
- $arr['title'] = json_encode(crypto_encapsulate($arr['title'],$key));
- if($arr['body'])
- $arr['body'] = json_encode(crypto_encapsulate($arr['body'],$key));
- }
-
-
if(array_key_exists('revision',$x)) {
// extended export encoding
@@ -1178,9 +1155,15 @@ function encode_item($item,$mirror = false) {
if($item['term'])
$x['tags'] = encode_item_terms($item['term']);
- if($item['diaspora_meta'])
- $x['diaspora_signature'] = crypto_unencapsulate(json_decode($item['diaspora_meta'],true),$key);
-
+ if($item['diaspora_meta']) {
+ $z = json_decode($item['diaspora_meta'],true);
+ if($z) {
+ if(array_key_exists('iv',$z))
+ $x['diaspora_signature'] = crypto_unencapsulate($z,$key);
+ else
+ $x['diaspora_signature'] = $z;
+ }
+ }
logger('encode_item: ' . print_r($x,true), LOGGER_DATA);
return $x;
@@ -2063,14 +2046,6 @@ function item_store($arr, $allow_exec = false) {
}
$arr = $translate['item'];
}
- if($arr['item_private']) {
- $key = get_config('system','pubkey');
- $arr['item_flags'] = $arr['item_flags'] | ITEM_OBSCURED;
- if($arr['title'])
- $arr['title'] = json_encode(crypto_encapsulate($arr['title'],$key));
- if($arr['body'])
- $arr['body'] = json_encode(crypto_encapsulate($arr['body'],$key));
- }
}
if((x($arr,'object')) && is_array($arr['object'])) {
@@ -2460,14 +2435,6 @@ function item_store_update($arr,$allow_exec = false) {
}
$arr = $translate['item'];
}
- if($arr['item_private']) {
- $key = get_config('system','pubkey');
- $arr['item_flags'] = $arr['item_flags'] | ITEM_OBSCURED;
- if($arr['title'])
- $arr['title'] = json_encode(crypto_encapsulate($arr['title'],$key));
- if($arr['body'])
- $arr['body'] = json_encode(crypto_encapsulate($arr['body'],$key));
- }
}
if((x($arr,'object')) && is_array($arr['object'])) {
@@ -3173,17 +3140,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
$title = $item['title'];
$body = $item['body'];
- if($private) {
- if(!($flag_bits & ITEM_OBSCURED)) {
- $key = get_config('system','pubkey');
- $flag_bits = $flag_bits|ITEM_OBSCURED;
- if($title)
- $title = json_encode(crypto_encapsulate($title,$key));
- if($body)
- $body = json_encode(crypto_encapsulate($body,$key));
- }
- }
- else {
+ if(! $private) {
if($flag_bits & ITEM_OBSCURED) {
$key = get_config('system','prvkey');
$flag_bits = $flag_bits ^ ITEM_OBSCURED;
diff --git a/include/reddav.php b/include/reddav.php
index 750ca1b24..c39f08f4d 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -1,7 +1,7 @@
<?php
/**
* @file include/reddav.php
- * @brief some DAV related functions for RedMatrix.
+ * @brief some DAV related functions for Hubzilla.
*
* This file contains some functions which did not fit into one of the RedDAV
* classes.
@@ -19,7 +19,7 @@
*/
use Sabre\DAV;
-use RedMatrix\RedDAV;
+use Hubzilla\RedDAV;
require_once('vendor/autoload.php');
require_once('include/attach.php');
diff --git a/include/text.php b/include/text.php
index deb5a4c90..71db0ec30 100644
--- a/include/text.php
+++ b/include/text.php
@@ -513,9 +513,9 @@ function attribute_contains($attr, $s) {
}
/**
- * @brief Logging function for RedMatrix.
+ * @brief Logging function for Hubzilla.
*
- * Logging output is configured through RedMatrix's system config. The log file
+ * Logging output is configured through Hubzilla's system config. The log file
* is set in system logfile, log level in system loglevel and to enable logging
* set system debugging.
*
@@ -681,7 +681,7 @@ function get_tags($s) {
// make sure the longer tags are returned first so that if two or more have common substrings
// we'll replace the longest ones first. Otherwise the common substring would be found in
// both strings and the string replacement would link both to the shorter strings and
- // fail to link the longer string. RedMatrix github issue #378
+ // fail to link the longer string. Hubzilla github issue #378
usort($ret,'tag_sort_length');
diff --git a/include/zot.php b/include/zot.php
index 3c7413b5c..53d3376dc 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1,7 +1,7 @@
<?php
/**
* @file include/zot.php
- * @brief RedMatrix implementation of zot protocol.
+ * @brief Hubzilla implementation of zot protocol.
*
* https://github.com/friendica/red/wiki/zot
* https://github.com/friendica/red/wiki/Zot---A-High-Level-Overview