From kde-commits Thu Mar 31 22:41:34 2005 From: Dirk Mueller Date: Thu, 31 Mar 2005 22:41:34 +0000 To: kde-commits Subject: bugs/bugz Message-Id: <20050331224134.E548465B () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111231096218530 CVS commit by mueller: allow to search for words with 3 letters M +6 -2 bug_email.pl 1.45 M +2 -2 simple_search.pl 1.24 --- bugs/bugz/bug_email.pl #1.44:1.45 @@ -567,7 +567,11 @@ if( $critical_err == 0 && $testMode == 0 ) { + SendSQL("LOCK TABLES bugs WRITE, longdescs WRITE"); + # update "last modifed" field + SendSQL("UPDATE bugs SET delta_ts=NOW() WHERE bug_id=" . SqlQuote($id) . ";"); # shove the new comment into the table - my $long_desc_query = "INSERT INTO longdescs SET bug_id= $found_id, who=$::userid, bug_when=NOW(), thetext=" . SqlQuote($Body) . ";"; - SendSQL($long_desc_query); + SendSQL("INSERT INTO longdescs SET bug_id= $found_id, who=$::userid, " . + "bug_when=NOW(), thetext=" . SqlQuote($Body) . ";"); + SendSQL("UNLOCK TABLES"); # update timestamp (#58843) --- bugs/bugz/simple_search.pl #1.23:1.24 @@ -48,5 +48,5 @@ $terms = ""; foreach my $term (@uterms) { - if( length($term) < 4 ) { # 4 is a MySQL compile-time constant + if( length($term) < 3 ) { # 4 is a MySQL compile-time constant push(@ignored_terms, $term); } else { @@ -57,5 +57,5 @@ if( scalar(@ignored_terms) > 0 ) { $vars->{'warning'} = '

The following words have been ignored because '. - 'of they are shorter than the minimum word length (4 characters): '. + 'of they are shorter than the minimum word length (3 characters): '. html_quote(join(', ', @ignored_terms)). '

';