aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-21 19:51:08 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-21 19:51:08 -0700
commit188dc1fcf8be7476ca912e3e0cd7aa6cef0c9e8c (patch)
tree621153500aba341b1cee98e800fbea70d5132579 /mod
parent399b6828f6888ff65d3ace22876c49f0887e88e6 (diff)
downloadvolse-hubzilla-188dc1fcf8be7476ca912e3e0cd7aa6cef0c9e8c.tar.gz
volse-hubzilla-188dc1fcf8be7476ca912e3e0cd7aa6cef0c9e8c.tar.bz2
volse-hubzilla-188dc1fcf8be7476ca912e3e0cd7aa6cef0c9e8c.zip
relationship direction was too confusing to work with. instead of "in,out,both" it's now declared by role e.g. "vip,fan,bud".
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php24
-rw-r--r--mod/dfrn_confirm.php12
-rw-r--r--mod/display.php2
-rw-r--r--mod/photos.php2
-rw-r--r--mod/profile.php2
5 files changed, 21 insertions, 21 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 45f792d30..d20d734d6 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -151,16 +151,16 @@ function contacts_content(&$a) {
$tpl = file_get_contents("view/contact_edit.tpl");
switch($r[0]['rel']) {
- case DIRECTION_BOTH:
+ case REL_BUD:
$dir_icon = 'images/lrarrow.gif';
$alt_text = t('Mutual Friendship');
break;
- case DIRECTION_IN;
+ case REL_VIP;
$dir_icon = 'images/larrow.gif';
$alt_text = t('is a fan of yours');
break;
- case DIRECTION_OUT;
+ case REL_FAN;
$dir_icon = 'images/rarrow.gif';
$alt_text = t('you are a fan of');
break;
@@ -186,7 +186,7 @@ function contacts_content(&$a) {
'$name' => $r[0]['name'],
'$dir_icon' => $dir_icon,
'$alt_text' => $alt_text,
- '$url' => (($r[0]['rel'] != DIRECTION_OUT) ? "redir/{$r[0]['id']}" : $r[0]['url'] )
+ '$url' => (($r[0]['rel'] != REL_FAN) ? "redir/{$r[0]['id']}" : $r[0]['url'] )
));
@@ -220,16 +220,16 @@ function contacts_content(&$a) {
switch($sort_type) {
- case DIRECTION_BOTH :
+ case REL_BUD :
$sql_extra2 = " AND `dfrn-id` != '' AND `issued-id` != '' ";
break;
- case DIRECTION_IN :
+ case REL_VIP :
$sql_extra2 = " AND `dfrn-id` = '' AND `issued-id` != '' ";
break;
- case DIRECTION_OUT :
+ case REL_FAN :
$sql_extra2 = " AND `dfrn-id` != '' AND `issued-id` = '' ";
break;
- case DIRECTION_NONE :
+ case 0 :
default:
$sql_extra2 = '';
break;
@@ -256,15 +256,15 @@ function contacts_content(&$a) {
continue;
switch($rr['rel']) {
- case DIRECTION_BOTH:
+ case REL_BUD:
$dir_icon = 'images/lrarrow.gif';
$alt_text = t('Mutual Friendship');
break;
- case DIRECTION_IN;
+ case REL_VIP;
$dir_icon = 'images/larrow.gif';
$alt_text = t('is a fan of yours');
break;
- case DIRECTION_OUT;
+ case REL_FAN;
$dir_icon = 'images/rarrow.gif';
$alt_text = t('you are a fan of');
break;
@@ -280,7 +280,7 @@ function contacts_content(&$a) {
'$dir_icon' => $dir_icon,
'$thumb' => $rr['thumb'],
'$name' => $rr['name'],
- '$url' => (($rr['rel'] != DIRECTION_OUT) ? "redir/{$rr['id']}" : $rr['url'] )
+ '$url' => (($rr['rel'] != REL_FAN) ? "redir/{$rr['id']}" : $rr['url'] )
));
}
$o .= '<div id="contact-edit-end"></div>';
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index f1a744689..3a534fb6f 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -127,9 +127,9 @@ function dfrn_confirm_post(&$a) {
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
}
- $new_relation = DIRECTION_OUT;
- if(($relation == DIRECTION_IN) || ($duplex))
- $new_relation = DIRECTION_BOTH;
+ $new_relation = REL_FAN;
+ if(($relation == REL_VIP) || ($duplex))
+ $new_relation = REL_BUD;
$r = q("UPDATE `contact` SET
`photo` = '%s',
@@ -362,9 +362,9 @@ function dfrn_confirm_post(&$a) {
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
}
- $new_relation = DIRECTION_IN;
- if(($relation == DIRECTION_OUT) || ($duplex))
- $new_relation = DIRECTION_BOTH;
+ $new_relation = REL_VIP;
+ if(($relation == REL_FAN) || ($duplex))
+ $new_relation = REL_BUD;
$r = q("UPDATE `contact` SET `photo` = '%s',
`thumb` = '%s',
diff --git a/mod/display.php b/mod/display.php
index 6149c3d5b..ae26864a3 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -189,7 +189,7 @@ function display_content(&$a) {
$template = $wallwall;
$commentww = 'ww';
// If it is our contact, use a friendly redirect link
- if(($item['owner-link'] == $item['url']) && ($item['rel'] == DIRECTION_IN || $item['rel'] == DIRECTION_BOTH))
+ if(($item['owner-link'] == $item['url']) && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD))
$owner_url = $redirect_url;
$owner_url = $redirect_url;
diff --git a/mod/photos.php b/mod/photos.php
index fa089c435..04dc23e37 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -696,7 +696,7 @@ function photos_content(&$a) {
$profile_url = $item['url'];
if(local_user() && ($item['contact-uid'] == get_uid())
- && ($item['rel'] == DIRECTION_IN || $item['rel'] == DIRECTION_BOTH) && (! $item['self'] ))
+ && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] ))
$profile_url = $redirect_url;
$profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
diff --git a/mod/profile.php b/mod/profile.php
index b155acf80..dab4ee6f2 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -326,7 +326,7 @@ function profile_content(&$a, $update = 0) {
// I can go directly to their profile as an authenticated guest.
if(local_user() && ($item['contact-uid'] == $_SESSION['uid'])
- && ($item['rel'] == DIRECTION_IN || $item['rel'] == DIRECTION_BOTH) && (! $item['self'] ))
+ && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] ))
$profile_url = $redirect_url;