From 9c4154db9880690c12dd4f50f403e66d38bd2a92 Mon Sep 17 00:00:00 2001
From: brettp
Date: Sun, 21 Nov 2010 20:36:40 +0000
Subject: Refs #2670: Merged XFN fixes from 1.7 to 1.8. Removed unused code in
profile_contents/details.php
git-svn-id: http://code.elgg.org/elgg/trunk@7401 36083f99-b078-4883-b0ff-0f9b5a30f544
---
mod/profile/views/default/profile/listing.php | 21 +++++++++++++--------
.../default/profile/profile_contents/details.php | 10 +---------
2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php
index 6dc8e0948..96b3d24d5 100644
--- a/mod/profile/views/default/profile/listing.php
+++ b/mod/profile/views/default/profile/listing.php
@@ -17,14 +17,19 @@ $icon = elgg_view(
$banned = $vars['entity']->isBanned();
// Simple XFN
-$rel = "";
-if (elgg_get_page_owner_guid() == $vars['entity']->guid)
- $rel = 'me';
-else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid))
- $rel = 'friend';
-
+$rel_type = "";
+if (get_loggedin_userid() == $vars['entity']->guid) {
+ $rel_type = 'me';
+} elseif (check_entity_relationship(get_loggedin_userid(), 'friend', $vars['entity']->guid)) {
+ $rel_type = 'friend';
+}
+
+if ($rel_type) {
+ $rel = "rel=\"$rel_type\"";
+}
+
if (!$banned) {
- $info .= "getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "
";
+ $info .= "getUrl() . "\" $rel>" . $vars['entity']->name . "
";
$location = $vars['entity']->location;
if (!empty($location)) {
$info .= "" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "
";
@@ -41,4 +46,4 @@ if (!$banned) {
$info .= "
";
}
-echo elgg_view_listing($icon, $info);
\ No newline at end of file
+echo elgg_view_listing($icon, $info);
diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/profile_contents/details.php
index 360ea0f9e..27b0f943b 100755
--- a/mod/profile/views/default/profile/profile_contents/details.php
+++ b/mod/profile/views/default/profile/profile_contents/details.php
@@ -4,14 +4,6 @@
* @uses $vars['entity'] The user entity
*/
-// Simple XFN
-$rel = "";
-if (elgg_get_page_owner_guid() == $vars['entity']->guid) {
- $rel = 'me';
-} else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid)) {
- $rel = 'friend';
-}
-
$even_odd = null;
if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) {
foreach($vars['config']->profile as $shortname => $valtype) {
@@ -46,4 +38,4 @@ if (!get_plugin_setting('user_defined_fields', 'profile')) {
echo "" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "
";
}
}
-}
\ No newline at end of file
+}
--
cgit v1.2.3