diff options
author | friendica <info@friendica.com> | 2013-01-09 23:07:13 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-09 23:07:13 -0800 |
commit | f0a08a05aedd8add7990f26c1a0d1894ddd06683 (patch) | |
tree | 1cb60f1955a0850b9ea110f9f5639ef3c8b71945 /mod | |
parent | 8a930241a434f5058289bd8d014fd2bd6a4e91a0 (diff) | |
download | volse-hubzilla-f0a08a05aedd8add7990f26c1a0d1894ddd06683.tar.gz volse-hubzilla-f0a08a05aedd8add7990f26c1a0d1894ddd06683.tar.bz2 volse-hubzilla-f0a08a05aedd8add7990f26c1a0d1894ddd06683.zip |
fix the "personal" network filter and introduction notifications
Diffstat (limited to 'mod')
-rw-r--r-- | mod/network.php | 14 | ||||
-rw-r--r-- | mod/ping.php | 8 |
2 files changed, 10 insertions, 12 deletions
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(); } |