Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm detecting a malfunction of link status in a view and I don`t kwon if I'm doing something wrong with the view or the code in views_handler_field_user_relationships_status_link.inc file is incorrect.
In line 45
//Requests by me.
if ($values->{$this->aliases['requester_id']} === $user->uid) {
if ($values->{$this->aliases['approved']}) {
return theme('user_relationships_remove_link', array('uid' => $values->{$this->aliases['requestee_id']}, 'rid' => $values->{$this->aliases['rid']})) ;
}
else {
return theme('user_relationships_pending_request_cancel_link', array('uid' => $values->{$this->aliases['requestee_id']}, 'rid' => $values->{$this->aliases['rid']})) ;
}
}
But I think it should be
//Requests by me.
if ($values->{$this->aliases['requester_id']} === $user->uid) {
if ($values->{$this->aliases['approved']}) {
return theme('user_relationships_remove_link', array('uid' => $values->{$this->aliases['requesteer_id']}, 'rid' => $values->{$this->aliases['rid']})) ;
}
else {
return theme('user_relationships_pending_request_cancel_link', array('uid' => $values->{$this->aliases['requesteer_id']}, 'rid' => $values->{$this->aliases['rid']})) ;
}
}
Am I wrong?
PS. Sorry for my english
Comment | File | Size | Author |
---|---|---|---|
#5 | user_relationships-status_link-1834500-3.patch | 1.28 KB | JvE |
#4 | user_relationships-status_link-1834500-3.patch | 1.28 KB | JvE |
#3 | user_relationships-status_link-1834500-3.patch | 1.28 KB | JvE |
Comments
Comment #1
franxo CreditAttribution: franxo commentedUps ...
NOT -> requesteer_id
YES -> requester_id
Comment #2
djween CreditAttribution: djween commentedHi,
I just posted: http://drupal.org/node/1838248#comment-6769138 regarding this issue which I see you also posted there.
I made the change you suggested above and it seems to have solved the issue however, I would need to do more testing and am curious if this will cause any issues anywhere else?
Has anyone else looked in to this issue?
Thanks.
Comment #3
JvE CreditAttribution: JvE commentedI know that in #1838248: Status link not working correctly in user browser view a different approach is being followed, but for convenience I'm adding the simple patch for whoever wants to use it.
Comment #4
JvE CreditAttribution: JvE commentedI know a different approach is being followed in #1838248: Status link not working correctly in user browser view but I thought I'd upload the simple patch here too'
Comment #5
JvE CreditAttribution: JvE commentedAttaching a simple patch taking a different approach than #1838248: Status link not working correctly in user browser view