Changeset 13577 for trunk/xmlrpc/BxDolXMLRPCMedia.php
- Timestamp:
- 01/17/10 19:32:34 (2 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCMedia.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCMedia.php
r13383 r13577 56 56 $sModuleName = 'photos'; 57 57 $sType = 'bx_photos'; 58 $sMemAction = 'BX_PHOTOS_VIEW'; 58 59 break; 59 60 case 'video': 60 61 $sModuleName = 'videos'; 61 62 $sType = 'bx_videos'; 63 $sMemAction = 'BX_VIDEOS_VIEW'; 62 64 break; 63 65 case 'music': 64 66 $sModuleName = 'sounds'; 65 67 $sType = 'bx_sounds'; 68 $sMemAction = 'BX_SOUNDS_VIEW'; 66 69 break; 67 70 default: 68 71 return array(); 69 72 } 73 74 if (!$this->_isMembershipEnabledFor($iIdProfileViewer, $sMemAction)) 75 return array (); 76 70 77 bx_import('BxDolAlbums'); 71 78 $o = new BxDolAlbums ($sType, (int)$iIdProfile); … … 148 155 return new xmlrpcval ($aFiles, "array"); 149 156 } 157 158 function _isMembershipEnabledFor ($iProfileId, $sMembershipActionConstant) { 159 defineMembershipActions (array('photos add', 'photos view', 'sounds view', 'videos view')); 160 if (!defined($sMembershipActionConstant)) 161 return false; 162 $aCheck = checkAction($iProfileId ? $iProfileId : $_COOKIE['memberID'], constant($sMembershipActionConstant)); 163 return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED; 164 } 150 165 } 151 166
Note: See TracChangeset
for help on using the changeset viewer.