Ignore:
Timestamp:
2014-08-07T14:51:04+12:00 (10 years ago)
Author:
ak19
Message:

Fixing off by one error of boolean operators in the GS3 search form interface. Kathy had located the problem in XSLUtil.getNumberedItem(). Fixed it by using String.split instead of StringUtils.split, since the latter skipped empty tokens.

File:
1 edited

Legend:

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

    r26557 r29175  
    150150    public static String getNumberedItem(String list, int number)
    151151    {
    152         String[] items = StringUtils.split(list, ",", -1);
     152        String[] items = list.split(",", -1); //String[] items = StringUtils.split(list, ",", -1);
     153        // Using StringUtils.split() causes an off-by-one error for the boolean operators (fqk)
     154        // where boolean operators combining rows in multiforms are shifted up by 1 row.
     155
    153156        if (items.length > number)
    154157        {
Note: See TracChangeset for help on using the changeset viewer.