aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channel.php4
-rw-r--r--include/connections.php5
-rwxr-xr-xinclude/items.php21
-rw-r--r--include/queue_fn.php2
-rw-r--r--include/zot.php1
5 files changed, 12 insertions, 21 deletions
diff --git a/include/channel.php b/include/channel.php
index 7c0397e11..5d583e4f1 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1718,9 +1718,9 @@ function advanced_profile() {
if(App::$profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), App::$profile['sexual'] );
- if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage']) );
+ if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage'], true) );
- if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown']) );
+ if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown'], true) );
if(App::$profile['politic']) $profile['politic'] = array( t('Political Views:'), App::$profile['politic']);
diff --git a/include/connections.php b/include/connections.php
index e942503f0..51df18b70 100644
--- a/include/connections.php
+++ b/include/connections.php
@@ -299,6 +299,11 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
$r = q("delete from pgrp_member where xchan = '%s'",
dbesc($xchan)
);
+
+ // Cannot delete just one side of the conversation since we do not allow
+ // you to block private mail replies. This would leave open a gateway for abuse.
+ // Both participants are owners of the conversation and both can remove it.
+
$r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' )",
dbesc($xchan),
dbesc($xchan)
diff --git a/include/items.php b/include/items.php
index 84bfc263b..6786b8b05 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1640,20 +1640,14 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
'allow_exec' => $allow_exec
];
- if ($arr['item_type']==ITEM_TYPE_CUSTOM) {
- /* Custom items are not stored by default
- because they require an addon to process. */
- $d['item']['cancel']=true;
-
- call_hooks('item_custom',$d);
- }
/**
* @hooks item_store
* Called when item_store() stores a record of type item.
* * \e array \b item
* * \e boolean \b allow_exec
*/
- call_hooks('item_store', $d);
+ call_hooks('item_store_before', $d);
+
$arr = $d['item'];
$allow_exec = $d['allow_exec'];
@@ -1961,6 +1955,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
*/
call_hooks('item_store', $arr);
+
/**
* @hooks post_remote
* Called when an activity arrives from another site.
@@ -2129,14 +2124,6 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) {
'allow_exec' => $allow_exec
];
- if ($arr['item_type']==ITEM_TYPE_CUSTOM) {
- /* Custom items are not stored by default
- because they require an addon to process. */
- $d['item']['cancel']=true;
-
- call_hooks('item_custom_update',$d);
- }
-
/**
* @hooks item_store_update
* Called when item_store_update() is called to update a stored item. It
@@ -2144,7 +2131,7 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) {
* * \e array \b item
* * \e boolean \b allow_exec
*/
- call_hooks('item_store_update', $d);
+ call_hooks('item_store_update_before', $d);
$arr = $d['item'];
$allow_exec = $d['allow_exec'];
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 85f98aaf9..865228041 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -286,7 +286,7 @@ function queue_deliver($outq, $immediate = false) {
$host_crypto = null;
if($channel && $base) {
- $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
+ $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_sitekey != '' order by hubloc_id desc limit 1",
dbesc($base)
);
if($h) {
diff --git a/include/zot.php b/include/zot.php
index 60bada1d6..bd85dd755 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2392,7 +2392,6 @@ function process_mail_delivery($sender, $arr, $deliveries) {
}
}
-
$r = q("select id, conv_guid from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($arr['mid']),
intval($channel['channel_id'])