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 /include/conversation.php | |
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 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/conversation.php b/include/conversation.php index 9a2ddd151..882d108f5 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -234,8 +234,8 @@ function localize_item(&$item){ if (activity_match($item['verb'],ACTIVITY_TAG)) { $r = q("SELECT * from `item`,`contact` WHERE - `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';", - dbesc($item['parent_uri'])); + `item`.`contact-id`=`contact`.`id` AND `item`.`mid`='%s';", + dbesc($item['parent_mid'])); if(count($r)==0) return; $obj=$r[0]; @@ -282,7 +282,7 @@ function localize_item(&$item){ $obj = parse_xml_string($xmlhead.$item['object']); if(strlen($obj->id)) { - $r = q("select * from item where uri = '%s' and uid = %d limit 1", + $r = q("select * from item where mid = '%s' and uid = %d limit 1", dbesc($obj->id), intval($item['uid']) ); @@ -634,7 +634,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { 'like' => '', 'dislike' => '', 'comment' => '', - 'conv' => (($preview) ? '' : array('href'=> z_root() . '/display/' . $item['uri'], 'title'=> t('View in context'))), + 'conv' => (($preview) ? '' : array('href'=> z_root() . '/display/' . $item['mid'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), 'thread_level' => 1, @@ -870,7 +870,7 @@ function like_puller($a,$item,&$arr,$mode) { $url = zid($url); if(! $item['thr_parent']) - $item['thr_parent'] = $item['parent_uri']; + $item['thr_parent'] = $item['parent_mid']; if(! ((isset($arr[$item['thr_parent'] . '-l'])) && (is_array($arr[$item['thr_parent'] . '-l'])))) $arr[$item['thr_parent'] . '-l'] = array(); @@ -1017,12 +1017,12 @@ function get_item_children($arr, $parent) { foreach($arr as $item) { if($item['id'] != $item['parent']) { if(get_config('system','thread_allow')) { - // Fallback to parent_uri if thr_parent is not set + // Fallback to parent_mid if thr_parent is not set $thr_parent = $item['thr_parent']; if($thr_parent == '') - $thr_parent = $item['parent_uri']; + $thr_parent = $item['parent_mid']; - if($thr_parent == $parent['uri']) { + if($thr_parent == $parent['mid']) { $item['children'] = get_item_children($arr, $item); $children[] = $item; } |