Changeset 5588


Ignore:
Timestamp:
Mar 15, 2011, 2:53:10 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1588: Plug-in configurations that hasn't been configued should not be visible in the gui

Location:
branches/2.17-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.17-stable/src/core/common-queries.xml

    r5566 r5588  
    19771977        (plg.requiresConfiguration = false)
    19781978        OR
    1979         (plg.requiresConfiguration = true AND NOT cfg.id IS NULL)
     1979        (plg.requiresConfiguration = true AND cfg.parameterVersion > 0)
    19801980      )
    19811981      GROUP BY plg.mainType
  • branches/2.17-stable/src/core/net/sf/basedb/util/AutoDetectFileFormat.java

    r5327 r5588  
    3535import net.sf.basedb.core.PluginConfiguration;
    3636import net.sf.basedb.core.PluginDefinition;
     37import net.sf.basedb.core.query.Expressions;
    3738import net.sf.basedb.core.query.Orders;
    3839import net.sf.basedb.core.query.Hql;
     40import net.sf.basedb.core.query.Restrictions;
    3941import net.sf.basedb.core.plugin.AutoDetectingImporter;
    4042import net.sf.basedb.core.plugin.GuiContext;
     
    138140      {
    139141        ItemQuery<PluginConfiguration> configQuery = plugin.getPluginConfigurations();
     142        configQuery.restrict(Restrictions.gt(Hql.property("parameterVersion"), Expressions.integer(0)));
    140143        configQuery.order(Orders.asc(Hql.property("name")));
    141144        configQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS);
  • branches/2.17-stable/www/common/plugin/index.jsp

    r5480 r5588  
    177177        )
    178178      );
     179    configQuery.restrict(Restrictions.gt(Hql.property("parameterVersion"), Expressions.integer(0)));
    179180    configQuery.order(Orders.asc(Hql.property("name")));
    180181    configQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS);
Note: See TracChangeset for help on using the changeset viewer.