diff options
author | friendica <info@friendica.com> | 2013-03-21 18:25:41 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-03-21 18:25:41 -0700 |
commit | ddf5bf8968a12501939cd37898d303967b748600 (patch) | |
tree | 9ec457948c7fadae811b1af676257c43bab93d4c /mod | |
parent | b3c699d49a5ef2023fcbdaa8226be95fce9589a7 (diff) | |
download | volse-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 'mod')
-rw-r--r-- | mod/community.php | 6 | ||||
-rw-r--r-- | mod/display.php | 18 | ||||
-rwxr-xr-x | mod/events.php | 4 | ||||
-rw-r--r-- | mod/item.php | 44 | ||||
-rwxr-xr-x | mod/like.php | 16 | ||||
-rw-r--r-- | mod/message.php | 2 | ||||
-rwxr-xr-x | mod/mood.php | 14 | ||||
-rw-r--r-- | mod/photos.php | 22 | ||||
-rwxr-xr-x | mod/poke.php | 10 | ||||
-rw-r--r-- | mod/search.php | 8 | ||||
-rwxr-xr-x | mod/subthread.php | 12 | ||||
-rw-r--r-- | mod/tagger.php | 12 |
12 files changed, 84 insertions, 84 deletions
diff --git a/mod/community.php b/mod/community.php index 4f6c3d3c9..971ecca5c 100644 --- a/mod/community.php +++ b/mod/community.php @@ -47,7 +47,7 @@ function community_content(&$a, $update = 0) { // OR your own posts if you are a logged in member if(! get_pconfig(local_user(),'system','alt_pager')) { - $r = q("SELECT COUNT(distinct(`item`.`uri`)) AS `total` + $r = q("SELECT COUNT(distinct(`item`.`mid`)) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' @@ -66,7 +66,7 @@ function community_content(&$a, $update = 0) { } - $r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`, + $r = q("SELECT distinct(`item`.`mid`), `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, @@ -77,7 +77,7 @@ function community_content(&$a, $update = 0) { AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`uri` + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`mid` ORDER BY `received` DESC LIMIT %d, %d ", intval($a->pager['start']), intval($a->pager['itemspage']) diff --git a/mod/display.php b/mod/display.php index 5b9621c3f..b1d376c41 100644 --- a/mod/display.php +++ b/mod/display.php @@ -20,8 +20,8 @@ function display_content(&$a, $update = 0, $load = false) { if(argc() > 1 && argv(1) !== 'load') $item_hash = argv(1); - if($_REQUEST['uri']) - $item_hash = $_REQUEST['uri']; + if($_REQUEST['mid']) + $item_hash = $_REQUEST['mid']; if(! $item_hash) { @@ -43,7 +43,7 @@ function display_content(&$a, $update = 0, $load = false) { $target_item = null; - $r = q("select uri, parent_uri from item where uri = '%s' limit 1", + $r = q("select mid, parent_mid from item where mid = '%s' limit 1", dbesc($item_hash) ); @@ -98,22 +98,22 @@ function display_content(&$a, $update = 0, $load = false) { $r = q("SELECT * from item WHERE item_restrict = 0 and uid = %d - and uri = '%s' + and mid = '%s' limit 1", intval(local_user()), - dbesc($target_item['parent_uri']) + dbesc($target_item['parent_mid']) ); } if($r === null) { $r = q("SELECT * from item WHERE item_restrict = 0 - and uri = '%s' + and mid = '%s' AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 ) and uid in ( " . stream_perms_api_uids() . " )) $sql_extra ) - group by uri limit 1", - dbesc($target_item['parent_uri']) + group by mid limit 1", + dbesc($target_item['parent_mid']) ); } @@ -150,7 +150,7 @@ function display_content(&$a, $update = 0, $load = false) { /* elseif((! $update) && (! { - $r = q("SELECT `id`, item_flags FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1", + $r = q("SELECT `id`, item_flags FROM `item` WHERE `id` = '%s' OR `mid` = '%s' LIMIT 1", dbesc($item_hash), dbesc($item_hash) ); diff --git a/mod/events.php b/mod/events.php index dd1f92f66..44f7522ad 100755 --- a/mod/events.php +++ b/mod/events.php @@ -380,7 +380,7 @@ function events_content(&$a) { $l_orig = ((x($orig_event)) ? $orig_event['location'] : ''); $eid = ((x($orig_event)) ? $orig_event['id'] : 0); $event_xchan = ((x($orig_event)) ? $orig_event['event_xchan'] : $channel['channel_hash']); - $uri = ((x($orig_event)) ? $orig_event['uri'] : ''); + $mid = ((x($orig_event)) ? $orig_event['mid'] : ''); if(! x($orig_event)) $sh_checked = ''; @@ -428,7 +428,7 @@ function events_content(&$a) { '$post' => $a->get_baseurl() . '/events', '$eid' => $eid, '$xchan' => $event_xchan, - '$uri' => $uri, + '$mid' => $mid, '$title' => t('Event details'), '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat), diff --git a/mod/item.php b/mod/item.php index 45c5944ce..89059c205 100644 --- a/mod/item.php +++ b/mod/item.php @@ -80,7 +80,7 @@ function item_post(&$a) { */ $parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0); - $parent_uri = ((x($_REQUEST,'parent_uri')) ? trim($_REQUEST['parent_uri']) : ''); + $parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : ''); $parent_item = null; $parent_contact = null; @@ -88,7 +88,7 @@ function item_post(&$a) { $parid = 0; $r = false; - if($parent || $parent_uri) { + if($parent || $parent_mid) { if(! x($_REQUEST,'type')) $_REQUEST['type'] = 'net-comment'; @@ -98,17 +98,17 @@ function item_post(&$a) { intval($parent) ); } - elseif($parent_uri && local_user()) { + elseif($parent_mid && local_user()) { // This is coming from an API source, and we are logged in - $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($parent_uri), + $r = q("SELECT * FROM `item` WHERE `mid` = '%s' AND `uid` = %d LIMIT 1", + dbesc($parent_mid), intval(local_user()) ); } // if this isn't the real parent of the conversation, find it if($r !== false && count($r)) { $parid = $r[0]['parent']; - $parent_uri = $r[0]['uri']; + $parent_mid = $r[0]['mid']; if($r[0]['id'] != $r[0]['parent']) { $r = q("SELECT * FROM `item` WHERE `id` = `parent` AND `parent` = %d LIMIT 1", intval($parid) @@ -127,7 +127,7 @@ function item_post(&$a) { // multi-level threading - preserve the info but re-parent to our single level threading //if(($parid) && ($parid != $parent)) - $thr_parent = $parent_uri; + $thr_parent = $parent_mid; if($parent_item['contact-id'] && $uid) { $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", @@ -474,20 +474,20 @@ function item_post(&$a) { $notify_type = (($parent) ? 'comment-new' : 'wall-new' ); - $uri = item_message_id(); - $parent_uri = $uri; + $mid = item_message_id(); + $parent_mid = $mid; if($parent_item) - $parent_uri = $parent_item['uri']; + $parent_mid = $parent_item['mid']; // Fallback so that we alway have a thr_parent if(!$thr_parent) - $thr_parent = $uri; + $thr_parent = $mid; $datarray = array(); if(! $parent) { - $datarray['parent_uri'] = $uri; + $datarray['parent_mid'] = $mid; $item_flags = $item_flags | ITEM_THREAD_TOP; } @@ -502,8 +502,8 @@ function item_post(&$a) { $datarray['commented'] = datetime_convert(); $datarray['received'] = datetime_convert(); $datarray['changed'] = datetime_convert(); - $datarray['uri'] = $uri; - $datarray['parent_uri'] = $parent_uri; + $datarray['mid'] = $mid; + $datarray['parent_mid'] = $parent_mid; $datarray['mimetype'] = $content_type; $datarray['title'] = $title; $datarray['body'] = $body; @@ -632,11 +632,11 @@ function item_post(&$a) { 'from_xchan' => $datarray['author_xchan'], 'to_xchan' => $datarray['owner_xchan'], 'item' => $datarray, - 'link' => $a->get_baseurl() . '/display/' . $datarray['uri'], + 'link' => $a->get_baseurl() . '/display/' . $datarray['mid'], 'verb' => ACTIVITY_POST, 'otype' => 'item', 'parent' => $parent, - 'parent_uri' => $parent_item['uri'] + 'parent_mid' => $parent_item['mid'] )); } @@ -651,7 +651,7 @@ function item_post(&$a) { 'from_xchan' => $datarray['author_xchan'], 'to_xchan' => $datarray['owner_xchan'], 'item' => $datarray, - 'link' => $a->get_baseurl() . '/display/' . $datarray['uri'], + 'link' => $a->get_baseurl() . '/display/' . $datarray['mid'], 'verb' => ACTIVITY_POST, 'otype' => 'item' )); @@ -663,10 +663,10 @@ function item_post(&$a) { if(! $parent) $parent = $post_id; - $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `changed` = '%s' + $r = q("UPDATE `item` SET `parent` = %d, `parent_mid` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", intval($parent), - dbesc(($parent == $post_id) ? $uri : $parent_item['uri']), + dbesc(($parent == $post_id) ? $mid : $parent_item['mid']), dbesc(datetime_convert()), intval($post_id) ); @@ -704,14 +704,14 @@ function item_post(&$a) { // store page info as an alternate message_id so we can access it via // https://sitename/page/$channelname/$pagetitle // if no pagetitle was given or it couldn't be transliterated into a url, use the first - // sixteen bytes of the uri - which makes the link portable and not quite as daunting - // as the entire uri. If it were the post_id the link would be less portable. + // sixteen bytes of the mid - which makes the link portable and not quite as daunting + // as the entire mid. If it were the post_id the link would be less portable. // We should have the ability to edit this and arrange pages into menus via the pages module q("insert into item_id ( iid, uid, sid, service ) values ( %d, %d, '%s','%s' )", intval($post_id), intval($channel['channel_id']), - dbesc(($pagetitle) ? $pagetitle : substr($uri,0,16)), + dbesc(($pagetitle) ? $pagetitle : substr($mid,0,16)), dbesc('WEBPAGE') ); } diff --git a/mod/like.php b/mod/like.php index 16be071bc..fe2126180 100755 --- a/mod/like.php +++ b/mod/like.php @@ -78,7 +78,7 @@ function like_content(&$a) { dbesc($activity), dbesc($observer['xchan_hash']), intval($item_id), - dbesc($item['uri']) + dbesc($item['mid']) ); if($r) { $like_item = $r[0]; @@ -97,19 +97,19 @@ function like_content(&$a) { - $uri = item_message_id(); + $mid = item_message_id(); $post_type = (($item['resource_type'] === 'photo') ? $t('photo') : t('status')); $links = array(array('rel' => 'alternate','type' => 'text/html', - 'href' => z_root() . '/display/' . $item['uri'])); + 'href' => z_root() . '/display/' . $item['mid'])); $objtype = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); $body = $item['body']; $obj = json_encode(array( 'type' => $objtype, - 'id' => $item['uri'], + 'id' => $item['mid'], 'link' => $links, 'title' => $item['title'], 'content' => $item['body'], @@ -139,19 +139,19 @@ function like_content(&$a) { $arr = array(); - $arr['uri'] = $uri; + $arr['mid'] = $mid; $arr['uid'] = $owner_uid; $arr['item_flags'] = $item_flags; $arr['parent'] = $item['id']; - $arr['parent_uri'] = $item['uri']; - $arr['thr_parent'] = $item['uri']; + $arr['parent_mid'] = $item['mid']; + $arr['thr_parent'] = $item['mid']; $arr['owner_xchan'] = $thread_owner['xchan_hash']; $arr['author_xchan'] = $observer['xchan_hash']; $ulink = '[url=' . $thread_owner['xchan_url'] . ']' . $thread_owner['xchan_name'] . '[/url]'; $alink = '[url=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/url]'; - $plink = '[url=' . $a->get_baseurl() . '/display/' . $item['uri'] . ']' . $post_type . '[/url]'; + $plink = '[url=' . $a->get_baseurl() . '/display/' . $item['mid'] . ']' . $post_type . '[/url]'; $arr['body'] = sprintf( $bodyverb, $alink, $ulink, $plink ); diff --git a/mod/message.php b/mod/message.php index 98a1067ed..94a8344ea 100644 --- a/mod/message.php +++ b/mod/message.php @@ -392,7 +392,7 @@ function message_content(&$a) { // FIXME - move this HTML to template $select = $message[$recp]['xchan_name'] . '<input type="hidden" name="messageto" value="' . $message[$recp]['xchan_hash'] . '" />'; - $parent = '<input type="hidden" name="replyto" value="' . $message['parent_uri'] . '" />'; + $parent = '<input type="hidden" name="replyto" value="' . $message['parent_mid'] . '" />'; $tpl = get_markup_template('mail_display.tpl'); $o = replace_macros($tpl, array( diff --git a/mod/mood.php b/mod/mood.php index 98064beab..b5414ca12 100755 --- a/mod/mood.php +++ b/mod/mood.php @@ -30,14 +30,14 @@ function mood_init(&$a) { if($parent) { - $r = q("select uri, owner_xchan, private, allow_cid, allow_gid, deny_cid, deny_gid + $r = q("select mid, owner_xchan, private, allow_cid, allow_gid, deny_cid, deny_gid from item where id = %d and parent = %d and uid = %d limit 1", intval($parent), intval($parent), intval($uid) ); if(count($r)) { - $parent_uri = $r[0]['uri']; + $parent_mid = $r[0]['mid']; $private = $r[0]['private']; $allow_cid = $r[0]['allow_cid']; $allow_gid = $r[0]['allow_gid']; @@ -58,11 +58,11 @@ function mood_init(&$a) { $poster = $a->get_observer(); - $uri = item_message_id(); + $mid = item_message_id(); $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['xchan_url'] . ']' . $poster['xchan_name'] . '[/url]' , $verbs[$verb]); $item_flags = ITEM_WALL|ITEM_ORIGIN|ITEM_UNSEEN; - if(! $parent_uri) + if(! $parent_mid) $item_flags |= ITEM_THREAD_TOP; @@ -70,11 +70,11 @@ function mood_init(&$a) { $arr['aid'] = get_account_id(); $arr['uid'] = $uid; - $arr['uri'] = $uri; - $arr['parent_uri'] = (($parent_uri) ? $parent_uri : $uri); + $arr['mid'] = $mid; + $arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid); $arr['item_flags'] = $item_flags; $arr['author_xchan'] = $poster['xchan_hash']; - $arr['owner_xchan'] = (($parent_uri) ? $r[0]['owner_xchan'] : $poster['xchan_hash']); + $arr['owner_xchan'] = (($parent_mid) ? $r[0]['owner_xchan'] : $poster['xchan_hash']); $arr['title'] = ''; $arr['allow_cid'] = $allow_cid; $arr['allow_gid'] = $allow_gid; diff --git a/mod/photos.php b/mod/photos.php index 90b2990aa..c562fc139 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -187,10 +187,10 @@ function photos_post(&$a) { intval($page_owner_uid) ); if(count($i)) { - q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_uri` = '%s' AND `uid` = %d", + q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d", dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc($i[0]['uri']), + dbesc($i[0]['mid']), intval($page_owner_uid) ); @@ -459,13 +459,13 @@ function photos_post(&$a) { if(count($taginfo)) { foreach($taginfo as $tagged) { - $uri = item_message_id(); + $mid = item_message_id(); $arr = array(); $arr['uid'] = $page_owner_uid; - $arr['uri'] = $uri; - $arr['parent_uri'] = $uri; + $arr['mid'] = $mid; + $arr['parent_mid'] = $mid; $arr['type'] = 'activity'; $arr['wall'] = 1; $arr['contact-id'] = $owner_record['id']; @@ -1000,12 +1000,12 @@ function photos_content(&$a) { $link_item = $linked_items[0]; $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0 + WHERE `parent_mid` = '%s' AND `mid` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `item`.`uid` = %d $sql_extra ", - dbesc($link_item['uri']), - dbesc($link_item['uri']), + dbesc($link_item['mid']), + dbesc($link_item['mid']), intval($link_item['uid']) ); @@ -1019,13 +1019,13 @@ function photos_content(&$a) { `contact`.`rel`, `contact`.`thumb`, `contact`.`self`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0 + WHERE `parent_mid` = '%s' AND `mid` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `item`.`uid` = %d $sql_extra ORDER BY `parent` DESC, `id` ASC LIMIT %d ,%d ", - dbesc($link_item['uri']), - dbesc($link_item['uri']), + dbesc($link_item['mid']), + dbesc($link_item['mid']), intval($link_item['uid']), intval($a->pager['start']), intval($a->pager['itemspage']) diff --git a/mod/poke.php b/mod/poke.php index 163ef0cd8..1738fd8dd 100755 --- a/mod/poke.php +++ b/mod/poke.php @@ -46,14 +46,14 @@ function poke_init(&$a) { $target = $r[0]; if($parent) { - $r = q("select uri, private, allow_cid, allow_gid, deny_cid, deny_gid + $r = q("select mid, private, allow_cid, allow_gid, deny_cid, deny_gid from item where id = %d and parent = %d and uid = %d limit 1", intval($parent), intval($parent), intval($uid) ); if(count($r)) { - $parent_uri = $r[0]['uri']; + $parent_mid = $r[0]['mid']; $private = $r[0]['private']; $allow_cid = $r[0]['allow_cid']; $allow_gid = $r[0]['allow_gid']; @@ -76,13 +76,13 @@ function poke_init(&$a) { $poster = $a->contact; - $uri = item_message_id(); + $mid = item_message_id(); $arr = array(); $arr['uid'] = $uid; - $arr['uri'] = $uri; - $arr['parent_uri'] = (($parent_uri) ? $parent_uri : $uri); + $arr['mid'] = $mid; + $arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid); $arr['type'] = 'activity'; $arr['wall'] = 1; $arr['contact-id'] = $poster['id']; diff --git a/mod/search.php b/mod/search.php index 1bea720a6..9ae9414d2 100644 --- a/mod/search.php +++ b/mod/search.php @@ -190,12 +190,12 @@ function search_content(&$a) { $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])); if($load) { - $r = q("SELECT distinct(uri), item.* from item + $r = q("SELECT distinct(mid), item.* from item WHERE item_restrict = 0 AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 ) OR ( `item`.`uid` = %d )) $sql_extra - group by uri ORDER BY created DESC $pager_sql ", + group by mid ORDER BY created DESC $pager_sql ", intval(local_user()), intval(ABOOK_FLAG_BLOCKED) @@ -228,7 +228,7 @@ function search_content(&$a) { - $r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`, + $r = q("SELECT distinct(`item`.`mid`), `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, @@ -240,7 +240,7 @@ function search_content(&$a) { OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 $sql_extra - group by `item`.`uri` + group by `item`.`mid` ORDER BY `received` DESC LIMIT %d , %d ", intval(local_user()), intval($a->pager['start']), diff --git a/mod/subthread.php b/mod/subthread.php index f8918e25d..cde8b3093 100755 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -15,7 +15,7 @@ function subthread_content(&$a) { $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0); - $r = q("SELECT * FROM `item` WHERE `parent` = '%s' OR `parent-uri` = '%s' and parent = id LIMIT 1", + $r = q("SELECT * FROM `item` WHERE `parent` = '%s' OR `parent-mid` = '%s' and parent = id LIMIT 1", dbesc($item_id), dbesc($item_id) ); @@ -84,7 +84,7 @@ function subthread_content(&$a) { return; } - $uri = item_message_id(); + $mid = item_message_id(); $post_type = (($item['resource_id']) ? t('photo') : t('status')); $objtype = (($item['resource_id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); @@ -96,7 +96,7 @@ function subthread_content(&$a) { <object> <type>$objtype</type> <local>1</local> - <id>{$item['uri']}</id> + <id>{$item['mid']}</id> <link>$link</link> <title></title> <content>$body</content> @@ -109,7 +109,7 @@ EOT; $arr = array(); - $arr['uri'] = $uri; + $arr['mid'] = $mid; $arr['uid'] = $owner_uid; $arr['contact-id'] = $contact['id']; $arr['type'] = 'activity'; @@ -117,8 +117,8 @@ EOT; $arr['origin'] = 1; $arr['gravity'] = GRAVITY_LIKE; $arr['parent'] = $item['id']; - $arr['parent-uri'] = $item['uri']; - $arr['thr_parent'] = $item['uri']; + $arr['parent-mid'] = $item['mid']; + $arr['thr_parent'] = $item['mid']; $arr['owner-name'] = $remote_owner['name']; $arr['owner-link'] = $remote_owner['url']; $arr['owner-avatar'] = $remote_owner['thumb']; diff --git a/mod/tagger.php b/mod/tagger.php index 9c36a8b09..ff99a2f8a 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -57,7 +57,7 @@ function tagger_content(&$a) { return; } - $uri = item_message_id(); + $mid = item_message_id(); $xterm = xmlify($term); $post_type = (($item['resource_id']) ? t('photo') : t('status')); $targettype = (($item['resource_id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); @@ -71,7 +71,7 @@ function tagger_content(&$a) { <target> <type>$targettype</type> <local>1</local> - <id>{$item['uri']}</id> + <id>{$item['mid']}</id> <link>$link</link> <title></title> <content>$body</content> @@ -101,14 +101,14 @@ EOT; $arr = array(); - $arr['uri'] = $uri; + $arr['mid'] = $mid; $arr['uid'] = $owner_uid; $arr['contact-id'] = $contact['id']; $arr['type'] = 'activity'; $arr['wall'] = $item['wall']; $arr['gravity'] = GRAVITY_COMMENT; $arr['parent'] = $item['id']; - $arr['parent_uri'] = $item['uri']; + $arr['parent_mid'] = $item['mid']; $arr['owner-name'] = $item['author-name']; $arr['owner-link'] = $item['author-link']; $arr['owner-avatar'] = $item['author-avatar']; @@ -159,8 +159,8 @@ EOT; // if the original post is on this site, update it. - $r = q("select `tag`,`id`,`uid` from item where `origin` = 1 AND `uri` = '%s' LIMIT 1", - dbesc($item['uri']) + $r = q("select `tag`,`id`,`uid` from item where `origin` = 1 AND `mid` = '%s' LIMIT 1", + dbesc($item['mid']) ); if(count($r)) { $x = q("SELECT `blocktags` FROM `user` WHERE `uid` = %d limit 1", |