mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 04:31:02 +01:00
FIXED: there was a bug in the search expression, use now \Q and \E.
ADDED: --config <file> allows one to use another config than the default.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: binary.pm,v 1.5 2000/04/26 22:57:38 thomas Exp thomas $
|
||||
# $Id: binary.pm,v 1.6 2000/06/25 19:48:00 scip Exp scip $
|
||||
# Perl module for note
|
||||
# binary database backend. see docu: perldoc NOTEDB::binary
|
||||
#
|
||||
@@ -25,7 +25,7 @@ BEGIN {
|
||||
my ($NOTEDB, $sizeof, $typedef,$version);
|
||||
my ($cipher);
|
||||
|
||||
$version = "(NOTEDB::binary, 1.5)";
|
||||
$version = "(NOTEDB::binary, 1.6)";
|
||||
|
||||
|
||||
sub new
|
||||
@@ -171,7 +171,7 @@ sub get_search
|
||||
($num, $note, $date) = unpack($typedef, $buffer);
|
||||
$n = ude($note);
|
||||
$t = ude($date);
|
||||
if($n =~ /$searchstring/i)
|
||||
if($n =~ /\Q$searchstring\E/i)
|
||||
{
|
||||
$res{$num}->{'note'} = $n;
|
||||
$res{$num}->{'date'} = $t;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: dbm.pm,v 1.1 2000/05/14 00:55:28 thomas Exp thomas $
|
||||
# $Id: dbm.pm,v 1.2 2000/06/25 19:51:11 scip Exp scip $
|
||||
# Perl module for note
|
||||
# DBM database backend. see docu: perldoc NOTEDB::dbm
|
||||
#
|
||||
@@ -107,7 +107,7 @@ sub get_search
|
||||
my($num, $note, $date, %res);
|
||||
|
||||
foreach $num (sort {$a <=> $b} keys %date) {
|
||||
if (ude($note{$num}) =~ /$searchstring/i) {
|
||||
if (ude($note{$num}) =~ /\Q$searchstring\E/i) {
|
||||
$res{$num}->{'note'} = ude($note{$num});
|
||||
$res{$num}->{'date'} = ude($date{$num});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: mysql.pm,v 1.4 2000/04/26 22:57:50 thomas Exp thomas $
|
||||
# $Id: mysql.pm,v 1.5 2000/06/25 19:50:43 scip Exp scip $
|
||||
# Perl module for note
|
||||
# mysql database backend. see docu: perldoc NOTEDB::binary
|
||||
#
|
||||
@@ -161,7 +161,7 @@ sub get_search
|
||||
foreach $num (sort { $a <=> $b } keys %res) {
|
||||
$note = ude($res{$num}->{'note'});
|
||||
$date = ude($res{$num}->{'date'});
|
||||
if($note =~ /$searchstring/i)
|
||||
if($note =~ /\Q$searchstring\E/i)
|
||||
{
|
||||
$res{$num}->{'note'} = $note;
|
||||
$res{$num}->{'date'} = $date;
|
||||
|
||||
Reference in New Issue
Block a user