Ignore:
Timestamp:
2012-08-09T17:20:51+12:00 (12 years ago)
Author:
ak19
Message:

Finally properly fixed the appearance and non-appearance of the quick search form. It should not appear if there are no query elements in the config file. However, even when no search indexes were built, query elements still came through in the XML and it was hard to distinguish at the XSLT stage whether any search indexes were built or not. Kathy suggested that the perl code writing out the buildconfig.xml should not write out the ServiceRacks for searching if no indexes were built and pointed out that the changes were required in buildconfigxml.pm which was called from basebuilder.pm to write out the buildConfig.xml file. Now the XSLT can at last do the right thing: it doesn't display the quick search area if there are no search elements, and doesn't provide the plain text query form in the quick search area if TextQuery isn't one of the query types, but does provide the buttons to other query types like form search if these are meant to be visible according to the SearchType format feature. If there are no search indexes built, then there is no quick search area.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/basebuilder.pm

    r25958 r26094  
    560560    }
    561561    }
     562   
     563    # store the number of indexes built to later determine whether search serviceracks get written out to buildConfig.xml
     564    $build_cfg->{'num_indexes'} = scalar (@indexmap);   
     565   
    562566    $build_cfg->{'indexmap'} = \@indexmap if scalar (@indexmap);
    563567
Note: See TracChangeset for help on using the changeset viewer.