Changeset 11678 for trunk/xmlrpc
- Timestamp:
- 07/22/09 23:57:13 (3 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc/BxDolXMLRPCImages.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc/BxDolXMLRPCImages.php
r11465 r11678 15 15 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 16 16 17 return parent::_getFilesInCategory (' shared_photo', $iIdProfile, $sCat);17 return parent::_getFilesInCategory ('photos', $iIdProfile, $sCat); 18 18 } 19 19 … … 23 23 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 24 24 25 if (BxDolService::call(' bx_photos', 'remove_file', array($iImageId)))25 if (BxDolService::call('photos', 'remove_object', array($iImageId))) 26 26 return new xmlrpcval ("ok"); 27 27 return new xmlrpcval ("fail"); … … 32 32 if (!($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) 33 33 return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1,"int")), "struct")); 34 /* 35 if (BxDolService::call(' shared_photo', 'make_thumbnail', array($iImageId), 'Main'))36 return new xmlrpcval ("ok"); */34 35 if (BxDolService::call('avatar', 'make_avatar_from_shared_photo_auto', array($iImageId))) 36 return new xmlrpcval ("ok"); 37 37 return new xmlrpcval ("fail"); 38 38 } … … 56 56 } 57 57 58 function uploadImage ($sUser, $sPwd, $ aCats, $binImageData, $iDataLength, $sTitle, $sTags, $sDesc)58 function uploadImage ($sUser, $sPwd, $mixedAlbum, $binImageData, $iDataLength, $sTitle, $sTags, $sDesc) 59 59 { 60 60 if (!($iId = BxDolXMLRPCUtil::checkLogin ($sUser, $sPwd))) … … 76 76 // upload 77 77 78 $sProfileCat = BxDolService::call('bx_photos', 'get_profile_cat', array()); 78 $aAlbum = array (); 79 if (is_array($mixedAlbum) && count($mixedAlbum) && $mixedAlbum[0]) 80 $aAlbum = $mixedAlbum; 81 elseif (is_string($mixedAlbum) && $mixedAlbum) 82 $aAlbum = array ($mixedAlbum); 83 else 84 $aAlbum = 'TODO: use getAlbumDefaultName'; 79 85 80 86 $aFileInfo = array(); … … 82 88 $aFileInfo['medDesc'] = process_db_input(htmlspecialchars_adv($sDesc)); 83 89 $aFileInfo['medTags'] = process_db_input(htmlspecialchars_adv($sTags)); 84 $aFileInfo['Categories'] = is_array($aCats) && count($aCats) ? $aCats : array($sProfileCat); 90 $aFileInfo['Categories'] = array (); 91 $aFileInfo['album'] = is_array($mixedAlbum) && count($mixedAlbum) ? $mixedAlbum : array($mixedAlbum); 85 92 86 93 $isUpdateThumb = (int)db_value("SELECT `Avatar` FROM `Profiles` WHERE `ID` = '$iId' LIMIT 1") ? false : true; 87 94 88 95 //Todo .. I can`t perform updating of omages by avatars. possible later 89 if (BxDolService::call(' bx_photos', 'perform_photo_upload', array($sTmpFilename, $aFileInfo, $isUpdateThumb), 'Uploader'))96 if (BxDolService::call('photos', 'perform_photo_upload', array($sTmpFilename, $aFileInfo, $isUpdateThumb), 'Uploader')) 90 97 return new xmlrpcval ("ok"); 91 98 else
Note: See TracChangeset
for help on using the changeset viewer.