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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

franxo’s picture

Ups ...

NOT -> requesteer_id
YES -> requester_id

djween’s picture

Hi,

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.

JvE’s picture

Status: Active » Needs review
FileSize
1.28 KB

I 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.

JvE’s picture

I 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'

JvE’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
FileSize
1.28 KB

Attaching a simple patch taking a different approach than #1838248: Status link not working correctly in user browser view