Changeset 11465 for trunk/xmlrpc/BxDolXMLRPCUtil.php
- Timestamp:
- 07/17/09 06:28:35 (3 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCUtil.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCUtil.php
r11418 r11465 82 82 function getThumbLink ($iId, $sType = 'thumb') 83 83 { 84 global $oFunctions; 85 $aProfileInfo = getProfileInfo( $iId ); 86 $aImageFile = BxDolService::call('bx_photos', 'get_image', array($aProfileInfo, $sType), 'Search'); 87 return $aImageFile ? $aImageFile['file'] : false; 84 $sType = $sType == 'thumb' ? 'medium' : 'small'; 85 return $GLOBALS['oFunctions']->getMemberAvatar ($iId, $sType); 88 86 } 89 87 … … 98 96 $aRet['country'] = new xmlrpcval($aSexSql['Country']); 99 97 $aRet['city'] = new xmlrpcval($aSexSql['City']); 98 $aRet['countFriends'] = new xmlrpcval(getFriendNumber($iId)); 100 99 101 100 bx_import('BxDolAlbums'); 102 101 103 102 $o = new BxDolAlbums ('bx_photos', $iId); 104 $aRet['countPhotos'] = new xmlrpcval($o->get AlbumList (array('owner' => $iId, 'status' => '')));103 $aRet['countPhotos'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 105 104 106 105 $o = new BxDolAlbums ('bx_videos', $iId); 107 $aRet['countVideos'] = new xmlrpcval($o->get AlbumList (array('owner' => $iId, 'status' => '')));106 $aRet['countVideos'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 108 107 109 108 $o = new BxDolAlbums ('bx_sounds', $iId); 110 $aRet['countSounds'] = new xmlrpcval($o->get AlbumList (array('owner' => $iId, 'status' => '')));109 $aRet['countSounds'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 111 110 112 111 return $aRet; … … 116 115 { 117 116 $sImageKey = ucfirst ($sImage); 118 $sImage = BxDolXMLRPCUtil::getThumbLink($a['ID'], $sImage); 117 $sImage = BxDolXMLRPCUtil::getThumbLink($a['ID'], $sImage); 118 119 bx_import('BxDolAlbums'); 120 121 $oPhotos = new BxDolAlbums ('bx_photos', $iId); 122 $oVideos = new BxDolAlbums ('bx_videos', $iId); 123 $oSounds = new BxDolAlbums ('bx_sounds', $iId); 124 119 125 return array ( 120 126 'ID' => new xmlrpcval($a['ID']), … … 125 131 'Country' => new xmlrpcval(_t($GLOBALS['aPreValues']['Country'][$a['Country']]['LKey'])), 126 132 'City' => new xmlrpcval($a['City']), 133 'CountPhotos' => new xmlrpcval($oPhotos->getObjTotalCount (array('owner' => $a['ID']))), 134 'CountVideos' => new xmlrpcval($oVideos->getObjTotalCount (array('owner' => $a['ID']))), 135 'CountSounds' => new xmlrpcval($oSounds->getObjTotalCount (array('owner' => $a['ID']))), 136 'CountFriends' => new xmlrpcval(getFriendNumber($a['ID'])), 127 137 $sImageKey => new xmlrpcval($sImage), 128 138 );
Note: See TracChangeset
for help on using the changeset viewer.