aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-21 20:36:40 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-21 20:36:40 +0000
commit9c4154db9880690c12dd4f50f403e66d38bd2a92 (patch)
treefacf1b91d05de5ddf90f397cffbbc0806ba4374f /mod/profile
parentf8c67ae94a730eeea673c5ef942c55094fbb5825 (diff)
downloadelgg-9c4154db9880690c12dd4f50f403e66d38bd2a92.tar.gz
elgg-9c4154db9880690c12dd4f50f403e66d38bd2a92.tar.bz2
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
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/views/default/profile/listing.php21
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/details.php10
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 .= "<p class='entity_title user'><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></p>";
+ $info .= "<p class='entity_title user'><a href=\"" . $vars['entity']->getUrl() . "\" $rel>" . $vars['entity']->name . "</a></p>";
$location = $vars['entity']->location;
if (!empty($location)) {
$info .= "<p class='entity_subtext user'>" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
@@ -41,4 +46,4 @@ if (!$banned) {
$info .= "</p>";
}
-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 "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>";
}
}
-} \ No newline at end of file
+}