aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/conversation.php12
-rw-r--r--mod/network.php14
-rw-r--r--mod/ping.php8
-rw-r--r--view/tpl/nav.tpl1
-rw-r--r--view/tpl/smarty3/nav.tpl1
5 files changed, 10 insertions, 26 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 56bcef559..88da4a0b9 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1035,20 +1035,10 @@ function conv_sort($arr,$order) {
foreach($parents as $i=>$_x)
$parents[$i]['children'] = get_item_children($arr, $_x);
- /*foreach($arr as $x) {
- if($x['id'] != $x['parent']) {
- $p = find_thread_parent_index($parents,$x);
- if($p !== false)
- $parents[$p]['children'][] = $x;
- }
- }*/
if(count($parents)) {
foreach($parents as $k => $v) {
if(count($parents[$k]['children'])) {
$parents[$k]['children'] = sort_item_children($parents[$k]['children']);
- /*$y = $parents[$k]['children'];
- usort($y,'sort_thr_created_rev');
- $parents[$k]['children'] = $y;*/
}
}
}
@@ -1059,8 +1049,6 @@ function conv_sort($arr,$order) {
$ret[] = $x;
if(count($x['children']))
add_children_to_list($x['children'], $ret);
- /*foreach($x['children'] as $y)
- $ret[] = $y;*/
}
}
diff --git a/mod/network.php b/mod/network.php
index a19390308..49121dd52 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -244,10 +244,13 @@ function network_content(&$a, $update = 0, $load = false) {
return login(false);
}
+
+
$arr = array('query' => $a->query_string);
call_hooks('network_content_init', $arr);
+ $channel = $a->get_channel();
$datequery = $datequery2 = '';
@@ -542,15 +545,10 @@ function network_content(&$a, $update = 0, $load = false) {
}
if($conv) {
- // find a substring of my profile url that can be normalised
- $myurl = $a->get_baseurl() . '/channel/' . $a->user['nickname'];
- $myurl = substr($myurl,strpos($myurl,'://')+3);
- $myurl = str_replace('www.','',$myurl);
-
- $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `item`.`author-link` like '%s' or `item`.`id` in (select term.oid from term where term.type = %d and term.term = '%s' and term.uid = `item`.`uid`))) ",
- dbesc(protect_sprintf('%' . $myurl)),
+ $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( author_xchan like '%s' or `item`.`id` in (select term.oid from term where term.type = %d and term.term = '%s' and term.uid = `item`.`uid`))) ",
+ dbesc(protect_sprintf($channel['channel_hash'])),
intval(TERM_MENTION),
- dbesc(protect_sprintf($a->user['username']))
+ dbesc(protect_sprintf($channel['channel_address']))
);
}
diff --git a/mod/ping.php b/mod/ping.php
index 3c3cef325..6f41c80a7 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -151,7 +151,7 @@ function ping_init(&$a) {
}
- if(argc() > 1 && (argv(1) === 'connect')) {
+ if(argc() > 1 && (argv(1) === 'intros')) {
$result = array();
@@ -165,18 +165,18 @@ function ping_init(&$a) {
if($r) {
foreach($r as $rr) {
$result[] = array(
- 'notify_link' => $a->get_baseurl() . '/notify/view-intro/' . $rr['abook_id'],
+ 'notify_link' => $a->get_baseurl() . '/intro/' . $rr['abook_id'],
'name' => $rr['xchan_name'],
'url' => $rr['xchan_url'],
'photo' => $rr['xchan_photo_s'],
'when' => relative_date($rr['abook_created']),
'class' => ('notify-unseen'),
- 'message' => strip_tags(sprintf( t("Connection request from %s"), $rr['xchan_name']))
+ 'message' => t('added your channel')
);
}
}
logger('ping: ' . print_r($result,true));
- echo json_encode(array( argv(1) => $result));
+ echo json_encode(array('notify' => $result));
killme();
}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 75865181d..19635e6a0 100644
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -65,7 +65,6 @@
<span id="intro-update" class="nav-notify fakelink" rel="#nav-intros-menu"></span>
<ul id="nav-intros-menu" class="menu-popup notify-menus" rel="intros">
<li id="nav-intros-see-all"><a href="$nav.intros.all.0">$nav.intros.all.1</a></li>
- <li id="nav-intros-mark-all"><a href="#" onclick="/*fixme*/ return false;">$nav.intros.mark.1</a></li>
<li class="empty">$emptynotifications</li>
</ul>
</li>
diff --git a/view/tpl/smarty3/nav.tpl b/view/tpl/smarty3/nav.tpl
index 88afbaa8e..c1d300978 100644
--- a/view/tpl/smarty3/nav.tpl
+++ b/view/tpl/smarty3/nav.tpl
@@ -65,7 +65,6 @@
<span id="intro-update" class="nav-notify fakelink" rel="#nav-intros-menu"></span>
<ul id="nav-intros-menu" class="menu-popup notify-menus" rel="intros">
<li id="nav-intros-see-all"><a href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a></li>
- <li id="nav-intros-mark-all"><a href="#" onclick="/*fixme*/ return false;">{{$nav.intros.mark.1}}</a></li>
<li class="empty">{{$emptynotifications}}</li>
</ul>
</li>