Changeset 3536


Ignore:
Timestamp:
Jun 29, 2007, 9:09:08 AM (16 years ago)
Author:
Martin Svensson
Message:

References #625. This will correct the issue related to #657

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/util/ContextUtil.java

    r3534 r3536  
    7272      if (!plugin.requiresConfiguration())
    7373      {
    74         ContextResult contextResult = new ContextResult(sc, plugin, null, context, currentItem);
    75         if (contextResult.isInContext())
    76         {
    77           results.add(contextResult);
    78         }
     74          results.add(new ContextResult(sc, plugin, null, context, currentItem));
    7975      }
    8076      if (configQuery != null && plugin.supportsConfigurations())
  • trunk/www/common/plugin/index.jsp

    r3518 r3536  
    180180    if (totalPlugins == 1 && contextMessages.size() == 0 && !(warnIfOpen && anotherIsOpen))
    181181    {
    182       // Only one plug-in exists, go directly to parameter input page
    183       PluginDefinition thePlugin = contextResult.get(0).getPluginDefinition();
     182      // Only one plug-in, that can be used, exists, find it in contextResult and
     183      //go directly to parameter input page
     184      int i = 0;
     185      PluginDefinition thePlugin = null;
     186      while (i < contextResult.size() && thePlugin == null)
     187      {
     188        if (contextResult.get(i).isInContext())
     189        {
     190          thePlugin = contextResult.get(i).getPluginDefinition();
     191        }
     192        i++;
     193      }
    184194      PluginConfiguration theConfig = contextResult.get(0).getPluginConfiguration();
    185195      int pluginDefinitionId = thePlugin.getId();
Note: See TracChangeset for help on using the changeset viewer.