Add commented-out use of rec.id_raw in cql_target()
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Utils.pm
index 856e602..9ead6b3 100644 (file)
@@ -181,6 +181,7 @@ sub cql_target {
     }
 
     return "rec.id=" . cql_quote($id);
+    #return "rec.id_raw=" . cql_quote($id);
 }
 
 
@@ -848,7 +849,7 @@ sub validate_record {
     my @errors = $id;
 
     if ($tests{'protocol'}) {
-       push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/;
+       push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/i;
     }
 
     if ($tests{'port'}) {
@@ -861,7 +862,7 @@ sub validate_record {
 
     if ($tests{'database'}) {
        push(@errors, 'database name is not valid') if $dbname =~ m,/,i;
-       push(@errors, 'database has trailing spaces') if $dbname ne trimField($dbname);
+       push(@errors, 'database has trailing spaces') if $dbname =~ /^\s+|\s+$/;
     }
 
     if ($tests{'hosturl'}) {