aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
committerfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
commitddf5bf8968a12501939cd37898d303967b748600 (patch)
tree9ec457948c7fadae811b1af676257c43bab93d4c /include/zot.php
parentb3c699d49a5ef2023fcbdaa8226be95fce9589a7 (diff)
downloadvolse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.gz
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.bz2
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.zip
rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/zot.php b/include/zot.php
index 814a694ac..7c54e5239 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -926,7 +926,7 @@ function process_delivery($sender,$arr,$deliveries,$relay) {
$channel = $r[0];
- $perm = (($arr['uri'] == $arr['parent_uri']) ? 'send_stream' : 'post_comments');
+ $perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments');
if(! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) {
logger("permission denied for delivery {$channel['channel_id']}");
@@ -957,13 +957,13 @@ function process_delivery($sender,$arr,$deliveries,$relay) {
$ev['uid'] = $channel['channel_id'];
$ev['account'] = $channel['channel_account_id'];
$ev['edited'] = $arr['edited'];
- $ev['uri'] = $arr['uri'];
+ $ev['mid'] = $arr['mid'];
$ev['private'] = $arr['item_private'];
// is this an edit?
- $r = q("SELECT resource_id FROM item where uri = '%s' and uid = %d and resource_type = 'event' limit 1",
- dbesc($arr['uri']),
+ $r = q("SELECT resource_id FROM item where mid = '%s' and uid = %d and resource_type = 'event' limit 1",
+ dbesc($arr['mid']),
intval($channel['channel_id'])
);
if($r) {
@@ -979,8 +979,8 @@ function process_delivery($sender,$arr,$deliveries,$relay) {
- $r = q("select id, edited from item where uri = '%s' and uid = %d limit 1",
- dbesc($arr['uri']),
+ $r = q("select id, edited from item where mid = '%s' and uid = %d limit 1",
+ dbesc($arr['mid']),
intval($channel['channel_id'])
);
if($r) {
@@ -1027,10 +1027,10 @@ function delete_imported_item($sender,$item,$uid) {
logger('delete_imported_item invoked',LOGGER_DEBUG);
$r = q("select id from item where ( author_xchan = '%s' or owner_xchan = '%s' )
- and uri = '%s' and uid = %d limit 1",
+ and mid = '%s' and uid = %d limit 1",
dbesc($sender['hash']),
dbesc($sender['hash']),
- dbesc($item['uri']),
+ dbesc($item['mid']),
intval($uid)
);
@@ -1061,8 +1061,8 @@ function process_mail_delivery($sender,$arr,$deliveries) {
continue;
}
- $r = q("select id from mail where uri = '%s' and channel_id = %d limit 1",
- dbesc($arr['uri']),
+ $r = q("select id from mail where mid = '%s' and channel_id = %d limit 1",
+ dbesc($arr['mid']),
intval($channel['channel_id'])
);
if($r) {