--- search/Search.cgi 2002/06/24 17:52:31 1.9
+++ search/Search.cgi 2002/06/25 15:02:32 1.13
@@ -14,7 +14,7 @@
#print "Content-type: text/plain\n\n";
-use Data::Dumper;
+#use Data::Dumper;
#--------------------------------------------------------------------------
#
@@ -232,25 +232,6 @@
$main::QueryReportMimeType = "application/x-wais-report";
-
-# Hash of icon/images names that we use
-%main::ImageNames = (
- 'banner', 'banner.gif',
- 'collapse', 'collapse.gif',
- 'expand', 'expand.gif',
- 'inactive-search', 'inactive-search.gif',
- 'active-search', 'active-search.gif',
- 'inactive-search-history', 'inactive-search-history.gif',
- 'active-search-history', 'active-search-history.gif',
- 'inactive-saved-searches', 'inactive-saved-searches.gif',
- 'active-saved-searches', 'active-saved-searches.gif',
- 'inactive-document-folders','inactive-document-folders.gif',
- 'active-document-folders', 'active-document-folders.gif',
- 'inactive-settings', 'inactive-settings.gif',
- 'active-settings', 'active-settings.gif',
-);
-
-
# Array of mime type names, we use this to map
# mime types to mime type names (which are more readable)
%main::MimeTypeNames = (
@@ -411,6 +392,7 @@
print("$JavaScript\n");
}
print '';
+ print '';
print("\n
\n");
@@ -521,47 +503,23 @@
}
}
- if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) {
- print("
");
+ my $DISABLED;
-
- }
- else {
-
- print("");
-
-
-
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : "";
+ print("");
if ( defined($main::RemoteUser) ) {
- if ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) {
- print("
");
- }
- else {
- print("");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : "";
+ print"";
- if ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) {
- print("
");
- }
- else {
- print("");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : "";
+ print"";
- if ( %MenuBar && defined($MenuBar{'ListFolder'}) ) {
- print("
");
- }
- else {
- print("");
- }
-
- if ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) {
- print("
");
- }
- else {
- print("");
- }
+ $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : "";
+ print"";
+
+ $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : "";
+ print"";
}
@@ -1571,6 +1529,8 @@
# nuke accented chars
$SearchString =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/;
+ # convert search string to lower case -> make search case insensitive
+ $SearchString =~ tr/A-Z/a-z/;
# Add the internal search terms
@@ -7158,34 +7118,34 @@
}
- if ( defined($main::FormData{'GetSearch.x'}) ) {
+ if ( defined($main::FormData{'GetSearch'}) ) {
$ENV{'PATH_INFO'} = "/GetSearch";
- delete($main::FormData{'GetSearch.x'});
- delete($main::FormData{'GetSearch.y'});
+ delete($main::FormData{'GetSearch'});
+ delete($main::FormData{'GetSearch'});
}
- if ( defined($main::FormData{'ListSearchHistory.x'}) ) {
+ if ( defined($main::FormData{'ListSearchHistory'}) ) {
$ENV{'PATH_INFO'} = "/ListSearchHistory";
- delete($main::FormData{'ListSearchHistory.x'});
- delete($main::FormData{'ListSearchHistory.y'});
+ delete($main::FormData{'ListSearchHistory'});
+ delete($main::FormData{'ListSearchHistory'});
}
- if ( defined($main::FormData{'ListSavedSearch.x'}) ) {
+ if ( defined($main::FormData{'ListSavedSearch'}) ) {
$ENV{'PATH_INFO'} = "/ListSavedSearch";
- delete($main::FormData{'ListSavedSearch.x'});
- delete($main::FormData{'ListSavedSearch.y'});
+ delete($main::FormData{'ListSavedSearch'});
+ delete($main::FormData{'ListSavedSearch'});
}
- if ( defined($main::FormData{'ListFolder.x'}) ) {
+ if ( defined($main::FormData{'ListFolder'}) ) {
$ENV{'PATH_INFO'} = "/ListFolder";
- delete($main::FormData{'ListFolder.x'});
- delete($main::FormData{'ListFolder.y'});
+ delete($main::FormData{'ListFolder'});
+ delete($main::FormData{'ListFolder'});
}
- if ( defined($main::FormData{'GetUserSettings.x'}) ) {
+ if ( defined($main::FormData{'GetUserSettings'}) ) {
$ENV{'PATH_INFO'} = "/GetUserSettings";
- delete($main::FormData{'GetUserSettings.x'});
- delete($main::FormData{'GetUserSettings.y'});
+ delete($main::FormData{'GetUserSettings'});
+ delete($main::FormData{'GetUserSettings'});
}