#2670 closed Defect (fixed)
Profile PlugIn $rel var setup
| Reported by: | Dhrup | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.7.5 |
| Component: | Profile | Version: | 1.7 |
| Severity: | minor | Keywords: | |
| Cc: | brettp | Difficulty: | trivial |
Description
There seems to be a little code problem in the 1.7.4 Profile PlugIn regarding
Simple XFN
$rel = "";
if (page_owner() == $varsentity?->guid)
$rel = 'me';
else if (check_entity_relationship(page_owner(), 'friend', $varsentity?->guid))
$rel = 'friend';
will always yield "me"
because both guid#s are equal to the page owner guid ;-)
So.. varsentity? *is the page_owner anyway ;)
to setup $rel - needs --
get_loggedin_userid() for the conditional
Simple fix
Simple XFN
$rel = "";
if (page_owner() == $varsentity?->guid)
if (page_owner() == get_loggedin_userid())
$rel = 'me';
else if (check_entity_relationship(page_owner(), 'friend', get_loggedin_userid()))
$rel = 'friend';
I do not expect this situation to really affect most users - until they want to use the $rel value
Change History (4)
comment:1 Changed 2 years ago by brettp
- Difficulty set to trivial
- Milestone changed from Needs Review to Elgg 1.7.5
comment:2 Changed 2 years ago by brettp
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 2 years ago by brettp
(In [svn:7400]) Refs #2670: Fixed profile XFN in user listing view.
comment:4 Changed 2 years ago by brettp
(In [svn:7401]) Refs #2670: Merged XFN fixes from 1.7 to 1.8. Removed unused code in profile_contents/details.php

(In [svn:7399]) Fixes #2670: Rel links are correct for XFN in profile pages.