[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat DBQuery.java

Saurabh Garg sgarg at ecoinformatics.org
Wed Nov 30 08:34:07 PST 2005


sgarg       05/11/30 08:34:07

  Modified:    src/edu/ucsb/nceas/metacat DBQuery.java
  Log:
  Modified code to that isModerator param is passed to the xsl which will render the results.
  
  Revision  Changes    Path
  1.117     +10 -3     metacat/src/edu/ucsb/nceas/metacat/DBQuery.java
  
  Index: DBQuery.java
  ===================================================================
  RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/DBQuery.java,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- DBQuery.java	17 Nov 2005 01:27:26 -0000	1.116
  +++ DBQuery.java	30 Nov 2005 16:34:07 -0000	1.117
  @@ -10,9 +10,9 @@
    *    Authors: Matt Jones
    *    Release: @release@
    *
  - *   '$Author: jones $'
  - *     '$Date: 2005/11/17 01:27:26 $'
  - * '$Revision: 1.116 $'
  + *   '$Author: sgarg $'
  + *     '$Date: 2005/11/30 16:34:07 $'
  + * '$Revision: 1.117 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
  @@ -277,6 +277,13 @@
   
            DBTransform trans = new DBTransform();
            response.setContentType("text/html");
  +
  +	 // if the user is a moderator, then pass a param to the 
  +         // xsl specifying the fact
  +         if(MetaCatUtil.isModerator(user, groups)){
  +        	 params.put("isModerator", new String[] {"true"});
  +         }
  +
            trans.transformXMLDocument(xml.toString(), "-//NCEAS//resultset//EN",
                                    "-//W3C//HTML//EN", qformat, out, params,
                                    sessionid);
  
  
  


More information about the Metacat-cvs mailing list