--- search/Search.cgi 2002/06/25 17:04:18 1.18 +++ search/Search.cgi 2002/06/25 17:48:55 1.19 @@ -1519,22 +1519,26 @@ my ($FieldName) = "FieldName" . $Value; my ($FieldContent) = "FieldContent" . $Value; + - - if ( defined($Content{$FieldName}) ) { - $SearchString .= defined($Content{$FieldContent}) ? - (($SearchString ne "") ? " AND " : "") . "$Content{$FieldName}=(" . $Content{$FieldContent} . ")" : ""; + if ( defined($Content{$FieldName}) && defined($Content{$FieldContent}) ) { + # nuke accented chars + $Content{$FieldContent} =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; + # convert search string to lower case -> make search case insensitive + $Content{$FieldContent} =~ tr/A-Z/a-z/; + + if ($Content{$FieldName} eq "ISBN") { + # fix stupid problem with dashes in data + $Content{$FieldContent} .= "*"; + } + + $SearchString .= ($SearchString ne "") ? " AND " : ""; + $SearchString .= "$Content{$FieldName}=(" . $Content{$FieldContent} . ")"; } } - # 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 - # Add the date restriction on the load time if ( defined($Content{'LastRunTime'}) && ($Content{'LastRunTime'} > 0) ) { $SearchString .= (($SearchString ne "") ? " AND " : "") . "time_t>=$Content{'LastRunTime'}"; @@ -5016,9 +5020,9 @@ print("
\n"); - print("You need to select at least one saved search in order to be able to perform an action on it.\n"); + print("Potrebno je odabrati barem jedno pretra¾ivanje nad kojim æe se izvr¹iti akcija.\n"); print("
\n"); goto bailFromProcessSavedSearch; } @@ -5305,10 +5309,10 @@ if ( $ENV{'PATH_INFO'} eq "/DeleteSavedSearch" ) { if ( unlink($SavedSearchFilePath) ) { - printf("
Successfully deleted: %s\n", $Value{'SearchName'}); + printf("
Uspje¹no pobrisano: %s\n", $Value{'SearchName'}); } else { - printf("
Failed to delete: %s\n", $Value{'SearchName'}); + printf("
Nije pobrisano: %s\n", $Value{'SearchName'}); } } elsif ( ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") || ($ENV{'PATH_INFO'} eq "/SuspendSavedSearch") ) { @@ -5322,12 +5326,12 @@ $Value{'SearchStatus'} = ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "Active" : "Inactive" ; if ( &iSaveXMLFileFromHash($SavedSearchFilePath, "SavedSearch", %Value) ) { - printf("
Successfully %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Uspje¹no %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "ukljuèeno" : "iskljuèeno", $Value{'SearchName'}); } else { - printf("
Failed to %s: %s\n", - ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "activated" : "suspended", $Value{'SearchName'}); + printf("
Nije %s: %s\n", + ($ENV{'PATH_INFO'} eq "/ActivateSavedSearch") ? "ukljuèeno" : "iskljuèeno", $Value{'SearchName'}); } } }