Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: include/items.php mod/item.php
This commit is contained in:
@@ -2357,6 +2357,24 @@ function diaspora_profile($importer,$xml,$msg) {
|
||||
|
||||
function diaspora_share($owner,$contact) {
|
||||
$a = get_app();
|
||||
|
||||
$enabled = intval(get_config('system','diaspora_enabled'));
|
||||
if(! $enabled) {
|
||||
logger('diaspora_share: disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
$allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
|
||||
if($allowed === false)
|
||||
$allowed = 1;
|
||||
|
||||
if(! intval($allowed)) {
|
||||
logger('diaspora_share: disallowed for channel ' . $importer['channel_name']);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
|
||||
if(! array_key_exists('xchan_hash',$contact)) {
|
||||
@@ -2932,6 +2950,14 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false)
|
||||
return 200;
|
||||
}
|
||||
|
||||
$allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
|
||||
if($allowed === false)
|
||||
$allowed = 1;
|
||||
|
||||
if(! intval($allowed)) {
|
||||
return 200;
|
||||
}
|
||||
|
||||
if($public_batch)
|
||||
$dest_url = $contact['hubloc_callback'] . '/public';
|
||||
else
|
||||
|
||||
@@ -431,7 +431,7 @@ function post_activity_item($arr) {
|
||||
|
||||
if(array_key_exists('item_private',$arr) && $arr['item_private']) {
|
||||
|
||||
$arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
|
||||
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
|
||||
|
||||
if($channel) {
|
||||
if($channel['channel_hash'] === $arr['author_xchan']) {
|
||||
@@ -2102,7 +2102,7 @@ function item_store($arr, $allow_exec = false) {
|
||||
|
||||
$arr['lang'] = detect_language($arr['body']);
|
||||
// apply the input filter here - if it is obscured it has been filtered already
|
||||
$arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
|
||||
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
|
||||
|
||||
if(local_channel() && (! $arr['sig'])) {
|
||||
$channel = get_app()->get_channel();
|
||||
@@ -2480,8 +2480,9 @@ function item_store_update($arr,$allow_exec = false) {
|
||||
if((! array_key_exists('item_obscured', $arr)) || $arr['item_obscured'] == 0) {
|
||||
|
||||
$arr['lang'] = detect_language($arr['body']);
|
||||
|
||||
// apply the input filter here - if it is obscured it has been filtered already
|
||||
$arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
|
||||
$arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
|
||||
|
||||
if(local_channel() && (! $arr['sig'])) {
|
||||
$channel = get_app()->get_channel();
|
||||
|
||||
Reference in New Issue
Block a user