Changeset 12990 for trunk/xmlrpc/BxDolXMLRPCMedia.php
- Timestamp:
- 10/20/09 19:42:05 (3 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCMedia.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCMedia.php
r11465 r12990 9 9 $iIdProfile = BxDolXMLRPCUtil::getIdByNickname ($sNick); 10 10 if (!$iIdProfile || !($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 11 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 11 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 12 12 13 13 return BxDolXMLRPCMedia::_getFilesInCategory ('videos', $iIdProfile, $sCat, 'video', 'getToken', 'flash/modules/video/files/get_mobile.php?id='); … … 24 24 25 25 function _getFilesInCategory ($sModuleName, $iIdProfile, $sCat, $sWidget = '', $sFuncToken = '', $sTokenUrl = '') 26 { 27 if ($sWidget ) {26 { 27 if ($sWidget && preg_match('/[a-zA-Z0-9]+/', $sWidget)) { 28 28 $GLOBALS['sModule'] = $sWidget; 29 29 require_once (BX_DIRECTORY_PATH_ROOT . "flash/modules/{$sWidget}/inc/header.inc.php"); 30 } 31 32 $a = BxDolService::call ($sModuleName, 'get_files_in_cat', array($iIdProfile, $sCat), 'Search'); 30 } else { 31 $sWidget = ''; 32 } 33 34 $sCat = process_db_input($sCat, BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION); 35 36 $a = BxDolService::call ($sModuleName, 'get_files_in_cat', array((int)$iIdProfile, $sCat), 'Search'); 33 37 if (!$a) 34 38 return new xmlrpcval (array(), "array"); … … 79 83 function _getMediaCategories ($sType, $iIdProfile) 80 84 { 85 $iIdProfile = (int)$iIdProfile; 81 86 switch ($sType) { 82 87 case 'photo': … … 158 163 } 159 164 bx_import('BxDolAlbums'); 160 $o = new BxDolAlbums ($sType, $iIdProfile);161 $aList = $o->getAlbumList (array('owner' => $iIdProfile));165 $o = new BxDolAlbums ($sType, (int)$iIdProfile); 166 $aList = $o->getAlbumList (array('owner' => (int)$iIdProfile)); 162 167 $aXmlRpc = array (); 163 168 foreach ($aList as $r) … … 195 200 function _getFilesInAlbum ($sModuleName, $iIdProfile, $iAlbumId, $sWidget = '', $sFuncToken = '', $sTokenUrl = '') 196 201 { 197 if ($sWidget ) {202 if ($sWidget && preg_match('/[a-zA-Z0-9]+/', $sWidget)) { 198 203 require_once (BX_DIRECTORY_PATH_ROOT . "flash/modules/global/inc/db.inc.php"); 199 204 require_once (BX_DIRECTORY_PATH_ROOT . "flash/modules/{$sWidget}/inc/header.inc.php"); … … 202 207 } 203 208 204 $a = BxDolService::call ($sModuleName, 'get_files_in_album', array( $iAlbumId), 'Search');209 $a = BxDolService::call ($sModuleName, 'get_files_in_album', array((int)$iAlbumId), 'Search'); 205 210 if (!$a) 206 211 return new xmlrpcval (array(), "array"); … … 227 232 } 228 233 return new xmlrpcval ($aFiles, "array"); 229 } 234 } 230 235 } 231 236
Note: See TracChangeset
for help on using the changeset viewer.