Ignore:
Timestamp:
Oct 3, 2011, 5:09:51 PM (13 years ago)
Author:
bayral
Message:

rename category to Albums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoLib/Service/PwgImagesService.cs

    r11903 r12336  
    4848            return returnValue;
    4949        }
    50        
    51         public PwgImageAdded addImageByMultiPartForm(FileInfo fileImage, Int32? imageId, Int32? categoryId, String imageName, String imageAuthor, String imageComment, Int32? imageLevel, List<PwgTag> imageTags)
     50
     51        public PwgImageAdded addImageByMultiPartForm(FileInfo fileImage, Int32? imageId, Int32? AlbumId, String imageName, String imageAuthor, String imageComment, PwgConfidentLevelEnum? imageLevel, List<PwgTag> imageTags)
    5252        {
    5353            PwgImageAdded returnValue = new PwgImageAdded();
     
    5555            try
    5656            {
    57                 PwgAddSimpleImageProxyResponse response = PwgImagesProxy.pwg_images_addSimple(fileImage, imageId, categoryId, imageName, imageAuthor, imageComment, imageLevel, imageTags);
     57                PwgAddSimpleImageProxyResponse response = PwgImagesProxy.pwg_images_addSimple(fileImage, imageId, AlbumId, imageName, imageAuthor, imageComment, (int) imageLevel, imageTags);
    5858
    5959                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
     
    8383
    8484        public Boolean addImage(FileInfo highResFile, FileInfo lowResFile, FileInfo thumbFile, String imageName, String imageAuthor, DateTime creationDate,
    85             String authorComment, List<String> lstCategories, List<String> lstTags, PwgConfidentLevelEnum? confidentLevel)
     85            String authorComment, List<String> lstAlbums, List<String> lstTags, PwgConfidentLevelEnum? confidentLevel)
    8686        {
    8787            Boolean returnValue = false;
     
    9797                PwgBaseProxyReponse response = PwgImagesProxy.pwg_images_add( fileMd5sum, thunbMd5sum, HighresMd5sum,
    9898                                                    imageMd5sum,  imageFilename, imageName, imageAuthor, creationDate, 
    99                                                     authorComment, lstCategories, lstTags, confidentLevel);
     99                                                    authorComment, lstAlbums, lstTags, confidentLevel);
    100100
    101101                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
     
    375375                                                    AvailableDate= pwgImg.AvailableDate,
    376376                                                    Tags         = pwgImg.Tags,
    377                                                     Categories   = pwgImg.Categories};
     377                                                    Albums   = pwgImg.Albums};
    378378
    379379               returnValue.ExtThumbail       = response.ExtThumbail       ;
     
    551551                }
    552552
    553                 returnValue.Categories = new List<PwgCategory>();
    554                 if (response.Categories != null)
    555                 {
    556                     foreach (PwgCategoryProxyResponse catResp in response.Categories)
    557                     {
    558                         PwgCategory aCat = PwgCategoriesService.ConvertProxyResponseToDTO(catResp);
    559                         returnValue.Categories.Add(aCat);
     553                returnValue.Albums = new List<PwgAlbum>();
     554                if (response.Albums != null)
     555                {
     556                    foreach (PwgAlbumProxyResponse catResp in response.Albums)
     557                    {
     558                        PwgAlbum aCat = PwgAlbumsService.ConvertProxyResponseToDTO(catResp);
     559                        returnValue.Albums.Add(aCat);
    560560                    }
    561561                }
Note: See TracChangeset for help on using the changeset viewer.