Changeset 32653


Ignore:
Timestamp:
2018-12-04T13:48:08+13:00 (5 years ago)
Author:
kjdon
Message:

renamed groupsContains to csvContains as that better reflects what its doing. Added getFormattedCCSSelection - returns a comma separated list of all collecitons and groups that are specified in the two args.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java

    r32459 r32653  
    113113    }
    114114
    115   public static boolean groupsContains(String user_groups, String this_group)
     115  public static boolean csvContains(String user_groups, String this_group)
    116116  {
    117117    String[] groups_array = user_groups.split(",");
     
    175175    }
    176176
     177  public static String getFormattedCCSSelection(String collections, String groups) {
     178
     179    String result = ",";
     180    if (collections != null && !collections.equals("")) {
     181      result += collections+",";
     182    }
     183    if (groups != null && !groups.equals("")) {
     184      String[] gps = groups.split(",");
     185      for (int i=0; i<gps.length; i++) {
     186    result += "group."+gps[i].replace('/','.') +",";
     187      }
     188    }
     189    return result;
     190  }
    177191    /**
    178192     * Generates links to equivalent documents for a document with a default
Note: See TracChangeset for help on using the changeset viewer.