aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-06 18:40:37 -0700
committerfriendica <info@friendica.com>2014-04-06 18:40:37 -0700
commit6f555c50e110235d125645113a58d1a2fda2eee8 (patch)
tree821a929961e3f477445d6c4ae2e867f469158879
parentb880982b614dc1397f2bbf1059dff0c04efe3c51 (diff)
downloadvolse-hubzilla-6f555c50e110235d125645113a58d1a2fda2eee8.tar.gz
volse-hubzilla-6f555c50e110235d125645113a58d1a2fda2eee8.tar.bz2
volse-hubzilla-6f555c50e110235d125645113a58d1a2fda2eee8.zip
a bit more work towards issue #395 - cleaning up some cases which were going to the url directly and which weren't going through chanview. Also worth noting - mentions in posts do not go through chanview. Perhaps it is time to kill chanview (except we then cannot implemented a "connected" or "connect" button since we don't have any control over the landing page). For the time being I'm just trying to trap as many of the "visit URL" links as possible and sending them to a common place. Then we can figure out how that common place should behave.
-rw-r--r--include/conversation.php12
-rw-r--r--mod/connedit.php2
-rw-r--r--mod/viewconnections.php2
3 files changed, 5 insertions, 11 deletions
diff --git a/include/conversation.php b/include/conversation.php
index df3f5f03c..e5cd3358f 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -911,7 +911,7 @@ function item_photo_menu($item){
}
}
- $profile_link = z_root() . "/chanview/?f=&hash=" . $item['author_xchan'];
+ $profile_link = chanlink_hash($item['author_xchan']);
$pm_url = $a->get_baseurl($ssl_state) . '/mail/new/?f=&hash=' . $item['author_xchan'];
if($a->contacts && array_key_exists($item['author_xchan'],$a->contacts))
@@ -964,13 +964,7 @@ function like_puller($a,$item,&$arr,$mode) {
$verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE);
if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
- $url = $item['author']['xchan_url'];
- if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
- $url = $a->get_baseurl(true) . '/redir/' . $item['contact-id'];
- $sparkle = ' class="sparkle" ';
- }
- else
- $url = zid($url);
+ $url = chanlink_url($item['author']['xchan_url']);
if(! $item['thr_parent'])
$item['thr_parent'] = $item['parent_mid'];
@@ -981,7 +975,7 @@ function like_puller($a,$item,&$arr,$mode) {
$arr[$item['thr_parent']] = 1;
else
$arr[$item['thr_parent']] ++;
- $arr[$item['thr_parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author']['xchan_name'] . '</a>';
+ $arr[$item['thr_parent'] . '-l'][] = '<a href="'. $url . '">' . $item['author']['xchan_name'] . '</a>';
}
return;
}
diff --git a/mod/connedit.php b/mod/connedit.php
index fde116b48..2719b7732 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -316,7 +316,7 @@ function connedit_content(&$a) {
array(
'label' => t('View Profile'),
- 'url' => $a->get_baseurl(true) . '/chanview/?f=&cid=' . $contact['abook_id'],
+ 'url' => chanlink_cid($contact['abook_id']),
'sel' => '',
'title' => sprintf( t('View %s\'s profile'), $contact['xchan_name']),
),
diff --git a/mod/viewconnections.php b/mod/viewconnections.php
index 4f6f81d82..84b976042 100644
--- a/mod/viewconnections.php
+++ b/mod/viewconnections.php
@@ -48,7 +48,7 @@ function viewconnections_content(&$a) {
foreach($r as $rr) {
- $url = zid($rr['xchan_url']);
+ $url = chanlink_url($rr['xchan_url']);
if($url) {
$contacts[] = array(
'id' => $rr['abook_id'],