Ignore:
Timestamp:
2017-11-14T14:38:11+13:00 (6 years ago)
Author:
kjdon
Message:

need to set docType for the main document element when editing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r32069 r32070  
    150150        }
    151151
     152        String document_type = (String) params.get(GSParams.DOCUMENT_TYPE);
     153        if (document_type != null && document_type.equals(""))
     154        {
     155            //document_type = "hierarchy";
     156            document_type = null; // we'll get it later if not already specified
     157        }
     158        // what if it is null here?? Anu to check...
    152159
    153160        boolean editing_document = false;
     
    186193
    187194          Element doc_elem = doc.createElement(GSXML.DOCUMENT_ELEM);
     195          doc_elem.setAttribute(GSXML.DOC_TYPE_ATT, document_type);
    188196          page_response.appendChild(doc_elem);
    189197          section.setAttribute(GSXML.NODE_ID_ATT, document_id);
     
    195203        }
    196204
    197         String document_type = (String) params.get(GSParams.DOCUMENT_TYPE);
    198         if (document_type != null && document_type.equals(""))
    199         {
    200             //document_type = "hierarchy";
    201             document_type = null; // we'll get it later if not already specified
    202         }
    203205        //whether to retrieve siblings or not
    204206        boolean get_siblings = false;
Note: See TracChangeset for help on using the changeset viewer.