Ignore:
Timestamp:
May 1, 2011, 12:44:59 PM (13 years ago)
Author:
mlg
Message:

Adds support for pwg.images.delete function
(deletes image).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/impl/CategoryDaoImpl.java

    r10714 r10716  
    116116    public boolean delete(Category category) throws JiwigoException {
    117117        //this document will allow to get pwg_token. it is necessary to delete a category
    118         Document docStatus = sessionManager.executeReturnDocument(MethodsEnum.SESSION_STATUS.getLabel());
    119         String pwgToken = Tools.getStringValueDom(docStatus.getDocumentElement(), "pwg_token");
    120         if (pwgToken.equals("")) {
    121             throw new JiwigoException("Error getting pwg_token. Returned document was : "
    122                     + Tools.documentToString(docStatus));
     118        String pwgToken = sessionManager.getPwgToken();
     119        if (pwgToken == null) {
     120            throw new JiwigoException("Error : received a null pwg_token");
    123121        }
    124122        if (LOG.isDebugEnabled()) {
Note: See TracChangeset for help on using the changeset viewer.