class friends_my_ref extends UIPage public list array public recordsCo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class friends_my_ref extends UIPage {
public $list = array();
public $recordsCount;
public $numResults = 10;
public function prepareData() {
if (!isli()) Helpers::redirect('/');
$userId = uid();
$startIndex = empty($_GET['page']) ? 0 : (int)$_GET['page'];
//Get all friends (limited)
$res = FriendStub::listFriends($startIndex, $this->numResults, 'ts_friendship_started', 'asc', $userId, IConstants::FRIEND_TYPE_INCOMING_ACTIVE);
if ($res['AxnService']['status'] == 'success') {
$this->list = $res['AxnService']['response'];
$this->listCount = $res['AxnService']['count'];
foreach ($this->list as $i => $item) {
$this->list[$i]['person'] = Helpers::getUserProfile($item['person_id']);
}
}
}