Changeset 27127
- Timestamp:
- 2013-03-26T13:08:13+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
r27090 r27127 199 199 { 200 200 Document currentDoc = this.converter.getDOM(currentFile); 201 if (currentDoc == null) { 202 // Can happen if an editor creates an auto-save temporary file 203 // (such as #header.xsl#) that is not well formed XML 204 continue; 201 if (currentDoc == null) 202 { 203 // Can happen if an editor creates an auto-save temporary file 204 // (such as #header.xsl#) that is not well formed XML 205 continue; 205 206 } 206 207 … … 634 635 root.appendChild(filepath); 635 636 636 if ((output.equals("xml")) || output.equals("json")) {637 // in the case of "json", calling method responsible for converting to JSON-string638 return theXML.getDocumentElement();639 }640 }641 637 if ((output.equals("xml")) || output.equals("json")) 638 { 639 // in the case of "json", calling method responsible for converting to JSON-string 640 return theXML.getDocumentElement(); 641 } 642 } 642 643 643 644 Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); … … 656 657 inlineTemplate = (String) params.get(GSParams.INLINE_TEMPLATE); 657 658 658 if (params.get(GSParams.DEBUG) != null && (((String) params.get(GSParams.DEBUG)).equals("on") || ((String) params.get(GSParams.DEBUG)).equals("1"))) 659 { 660 _debug = true; 659 if (params.get(GSParams.DEBUG) != null && (((String) params.get(GSParams.DEBUG)).equals("on") || ((String) params.get(GSParams.DEBUG)).equals("1") || ((String) params.get(GSParams.DEBUG)).equals("true"))) 660 { 661 String[] groups = new UserContext(request).getGroups(); 662 663 boolean found = false; 664 for (String g : groups) 665 { 666 if (g.equals("administrator")) 667 { 668 found = true; 669 } 670 } 671 if (found) 672 { 673 _debug = true; 674 } 661 675 } 662 676 } … … 981 995 } 982 996 983 984 997 // The transformer will now work out the resulting doctype from any set in the (merged) stylesheets and 985 998 // will set this in the output document it creates. So don't pass in any docWithDocType to the transformer
Note:
See TracChangeset
for help on using the changeset viewer.