Changeset 4974


Ignore:
Timestamp:
Jun 15, 2009, 11:05:06 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 2.12.1 to the trunk.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/credits.txt

    r4947 r4974  
    11$Id$
    22
    3 The current BASE team is (at BASE 2.12.0 release)
     3The current BASE team is (at BASE 2.12.1 release)
    44{{{
    55Jari Häkkinen
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r4963 r4974  
    18591859          </simpara>
    18601860
     1861          <simpara>
     1862            Values are sent as strings to BASE that converts them to the
     1863            proper value type before they are passed on to your plug-in.
     1864            However, there is one case that can't be
     1865            accurately represented with custom JSP pages, namely 'null' values.
     1866            A null value is sent by not sending any value at all. This is not
     1867            possible with a fixed form. It is of course possible to add some custom
     1868            JavaScript that adds and removes form elements as needed, but it is
     1869            also possible to let the empty string represent null. Just include a
     1870            hidden parameter like this if you want an empty value for the 'one'
     1871            parameter converted to null:
     1872          </simpara>
     1873<programlisting language="xml">
     1874&lt;input type="hidden" name="parameter:one:emptyIsNull" value="1"&gt;
     1875</programlisting>
    18611876          </listitem>
    18621877          </itemizedlist>
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/ExtensionsControl.java

    r4872 r4974  
    128128  */
    129129  public static synchronized void init(ExtensionsDirectory directory,
    130     ServletContext servletContext)
     130    ServletContext context)
    131131  {
    132132    if (initialised) return;
    133133    log.info("Initialising extensions controller");
    134134    extensionsDir = directory;
     135    servletContext = context;
    135136   
    136137    // Create registry
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/RequestWrapper.java

    r4703 r4974  
    4141  private final String pathInfo;
    4242  private final String servletPath;
     43  private final String originalServletPath;
    4344 
    4445  public RequestWrapper(HttpServletRequest request, String servletPath, String pathInfo)
     
    4748    this.pathInfo = pathInfo;
    4849    this.servletPath = servletPath;
     50    this.originalServletPath = super.getServletPath();
    4951  }
    5052
     
    6163  public String getServletPath()
    6264  {
    63     return servletPath;
     65    // If the result of 'super.getServletPath()' has changed since
     66    // we created this wrapper, Tomcat is messing around with forward or
     67    // include requests
     68    String sp = super.getServletPath();
     69    return originalServletPath.equals(sp) ? servletPath : sp;
    6470  }
    6571  // ------------------------------------
  • trunk/src/core/net/sf/basedb/util/basefile/BaseFileWriter.java

    r4930 r4974  
    227227 
    228228  private Pattern r = Pattern.compile("\r");
    229   private Pattern n = Pattern.compile("\r");
     229  private Pattern n = Pattern.compile("\n");
    230230
    231231  /**
     
    236236  public String baseEscape(String in)
    237237  {
    238     in = r.matcher(in).replaceAll("\\\\n");
     238    in = r.matcher(in).replaceAll("\\\\r");
    239239    in = n.matcher(in).replaceAll("\\\\n");
    240240    return in;
  • trunk/src/core/net/sf/basedb/util/export/TableWriter.java

    r4926 r4974  
    108108    {
    109109      if (!first) print(ds);
    110       if (d != null) print(d == null ? nv : d.toString());
     110      print(d == null ? nv : d.toString());
    111111      first = false;
    112112    }
  • trunk/src/core/net/sf/basedb/util/export/spotdata/BaseFileExporter.java

    r4926 r4974  
    240240      String key = entry.getKey();
    241241      String value = entry.getValue();
     242      String section = null;
    242243      if (first)
    243244      {
     245        first = false;
    244246        if ("section".equals(key))
    245247        {
    246           out.baseBeginSection(value);
    247           continue;
     248          section = value;
     249          key = null;
    248250        }
    249251        else
    250252        {
    251           out.baseBeginSection("settings");
     253          section = "settings";
    252254        }
    253         first = false;
    254255      }
    255       ++numParameters;
    256       out.basePrintHeader(key, value);
     256      if (section != null) out.baseBeginSection(section);
     257      if (key != null)
     258      {
     259        ++numParameters;
     260        out.basePrintHeader(key, value);
     261      }
    257262    }
    258263    out.flush();
    259264    return numParameters;
    260265  }
     266
    261267
    262268  /**
  • trunk/src/core/net/sf/basedb/util/export/spotdata/FieldConverter.java

    r4930 r4974  
    271271  {
    272272    DynamicField df = null;
    273     for (int i = 1; i < source.getRawDataType().getChannels(); ++i)
     273    for (int i = 1; i <= source.getRawDataType().getChannels(); ++i)
    274274    {
    275275      if (fieldName.equals("intensity"+i))
  • trunk/src/plugins/core/net/sf/basedb/plugins/JepIntensityTransformer.java

    r4917 r4974  
    354354        {
    355355          String parameterName = "ch" + ch + ".expression";
    356           String defaultExpression = "ch(" + ch + ")";
     356          String defaultExpression = "rawCh(" + ch + ")";
    357357          PluginParameter<String> chParameter = new PluginParameter<String>(
    358358            parameterName, "Ch " + ch + " transformation",
  • trunk/www/common/plugin/index.jsp

    r4962 r4974  
    372372        {
    373373          String[] sValues = request.getParameterValues("parameter:"+param.getName());
     374          boolean emptyIsNull = Values.getBoolean(request.getParameter("parameter:" + param.getName() + ":emptyIsNull"));
     375          if (emptyIsNull)
     376          {
     377            for (int i = 0; i < sValues.length; ++i)
     378            {
     379              if ("".equals(sValues[i])) sValues[i] = null;
     380            }
     381          }
    374382          Object[] oValues = null;
    375383          try
  • trunk/www/plugins/net/sf/basedb/plugins/jep_intensity_transformer.jsp

    r4917 r4974  
    315315        <td style="text-align: right">Resulting transform</td>
    316316        <td>
     317          <input type="hidden" name="parameter:resultTransform:emptyIsNull" value="1" />
    317318          <select name="parameter:resultTransform">
    318319          <option value="">- same as source data -
  • trunk/www/views/experiments/bioassays/list_bioassays.jsp

    r4908 r4974  
    369369          sortable="false"
    370370          filterable="true"
    371           exportable="true"
     371          exportable="false"
    372372          formatter="<%=formatter%>"
    373373        />
Note: See TracChangeset for help on using the changeset viewer.