aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views')
-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
+}