Ignore:
Timestamp:
2018-10-30T10:30:53+13:00 (5 years ago)
Author:
kjdon
Message:

receptionist now passes languageList (from interfaceConfig) to teh actions, so an action can add it into the page response if it needs to, rather than the receptionist adding it in to every page. its only ever used in prefs page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r32366 r32549  
    133133        setUpInterfaceOptions(config_elem);
    134134
     135        this.language_list = (Element) GSXML.getChildByTagName(config_elem, "languageList");
     136        if (this.language_list == null)
     137        {
     138            logger.error(" didn't find a language list in the config file!!");
     139        }
     140       
    135141        // load up the actions
    136142        Element action_list = (Element) GSXML.getChildByTagName(config_elem, GSXML.ACTION_ELEM + GSXML.LIST_MODIFIER);
     
    157163            ac.configure();
    158164            ac.addActionParameters(this.params);
     165            ac.setLanguageList(this.language_list);
    159166            this.action_map.put(action_name, ac);
    160167        }
    161168
    162         this.language_list = (Element) GSXML.getChildByTagName(config_elem, "languageList");
    163         if (language_list == null)
    164         {
    165             logger.error(" didn't find a language list in the config file!!");
    166         }
    167169
    168170        return true;
     
    230232                ac.configure();
    231233                ac.addActionParameters(this.params);
     234                ac.setLanguageList(this.language_list);
    232235                this.action_map.put(action, ac);
    233236                a = ac;
     
    317320        Element p = (Element)params.item(j);
    318321        if (!p.getAttribute(GSXML.SENSITIVE_ATT).equals("")) {
    319           logger.error("removing param "+p.getAttribute("name"));
     322          logger.debug("removing param "+p.getAttribute("name"));
    320323          param_list.removeChild(p);
    321324        }
Note: See TracChangeset for help on using the changeset viewer.