Changeset 13382 for trunk/xmlrpc/BxDolXMLRPCUtil.php
- Timestamp:
- 12/07/09 21:07:35 (2 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCUtil.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCUtil.php
r13379 r13382 86 86 } 87 87 88 function getUserInfo($iId )88 function getUserInfo($iId, $iIdViewer = 0) 89 89 { 90 if (!$iIdViewer) 91 $iIdViewer = $_COOKIE['memberID']; 92 90 93 $aRet = array (); 91 94 $aSexSql = getProfileInfo((int)$iId); … … 99 102 $aRet['countFriends'] = new xmlrpcval(getFriendNumber($iId)); 100 103 101 bx_import('BxDolAlbums'); 102 103 $o = new BxDolAlbums ('bx_photos', $iId); 104 $aRet['countPhotos'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 105 106 $o = new BxDolAlbums ('bx_videos', $iId); 107 $aRet['countVideos'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 108 109 $o = new BxDolAlbums ('bx_sounds', $iId); 110 $aRet['countSounds'] = new xmlrpcval($o->getObjTotalCount (array('owner' => $iId))); 104 $aRet['countPhotos'] = new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('photo', $iId, $iIdViewer)); 105 $aRet['countVideos'] = new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('video', $iId, $iIdViewer)); 106 $aRet['countSounds'] = new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('music', $iId, $iIdViewer)); 111 107 112 108 return $aRet; 113 109 } 114 110 115 function fillProfileArray ($a, $sImage = 'icon' )111 function fillProfileArray ($a, $sImage = 'icon', $iIdViewer = 0) 116 112 { 113 if (!$iIdViewer) 114 $iIdViewer = $_COOKIE['memberID']; 115 117 116 $sImageKey = ucfirst ($sImage); 118 117 $sImage = BxDolXMLRPCUtil::getThumbLink($a['ID'], $sImage); 119 118 120 119 bx_import('BxDolAlbums'); 121 122 $oPhotos = new BxDolAlbums ('bx_photos', $iId);123 $oVideos = new BxDolAlbums ('bx_videos', $iId);124 $oSounds = new BxDolAlbums ('bx_sounds', $iId);125 120 126 121 return array ( … … 132 127 'Country' => new xmlrpcval(_t($GLOBALS['aPreValues']['Country'][$a['Country']]['LKey'])), 133 128 'City' => new xmlrpcval($a['City']), 134 'CountPhotos' => new xmlrpcval( $oPhotos->getObjTotalCount (array('owner' => $a['ID']))),135 'CountVideos' => new xmlrpcval( $oVideos->getObjTotalCount (array('owner' => $a['ID']))),136 'CountSounds' => new xmlrpcval( $oSounds->getObjTotalCount (array('owner' => $a['ID']))),129 'CountPhotos' => new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('photo', $iId, $iIdViewer)), 130 'CountVideos' => new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('video', $iId, $iIdViewer)), 131 'CountSounds' => new xmlrpcval(BxDolXMLRPCMedia::_getMediaCount('music', $iId, $iIdViewer)), 137 132 'CountFriends' => new xmlrpcval(getFriendNumber($a['ID'])), 138 133 $sImageKey => new xmlrpcval($sImage),
Note: See TracChangeset
for help on using the changeset viewer.