diff --git a/Changelog b/Changelog index 88ea4e4..10345b4 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +1.3.12: +FIXED: NOTEDB::general data backend module did overwrite records if + there were some deleted ones in the database. +================================================================================ 1.3.11: FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code. ================================================================================ diff --git a/NOTEDB/general.pm b/NOTEDB/general.pm index dd2ab5c..078cf1c 100644 --- a/NOTEDB/general.pm +++ b/NOTEDB/general.pm @@ -4,7 +4,7 @@ package NOTEDB::general; -$NOTEDB::general::VERSION = "1.02"; +$NOTEDB::general::VERSION = "1.03"; use strict; #use Data::Dumper; @@ -136,12 +136,15 @@ sub get_nextnum { foreach (keys %{$this->{cache}}) { $num++; } - return $num; + return $num; } my %data = $this->get_all(); - my $size = scalar keys %data; - $num = $size + 1; + my @numbers = sort { $a <=> $b } keys %data; + $num = pop @numbers; + $num++; + return $num; + return $num; } diff --git a/NOTEDB/text.pm b/NOTEDB/text.pm index b06edee..c81f648 100644 --- a/NOTEDB/text.pm +++ b/NOTEDB/text.pm @@ -124,10 +124,6 @@ sub get_nextnum { my @numbers = sort { $a <=> $b } keys %{$this->{cache}}; $num = pop @numbers; $num++; - #$num = 1; - #foreach (keys %{$this->{cache}}) { - # $num++; - #} return $num; } @@ -135,8 +131,6 @@ sub get_nextnum { my @numbers = sort { $a <=> $b } keys %data; $num = pop @numbers; $num++; - #my $size = scalar keys %data; - #$num = $size + 1; return $num; } diff --git a/README b/README index b2cb662..f0af4a4 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -note 1.3.11 by Thomas Linden, 02/10/2012 +note 1.3.12 by Thomas Linden, 07/19/2012 ======================================= Introduction @@ -214,4 +214,4 @@ and I'll add you. Last changed ============ -02/09/2012 +07/19/2012 diff --git a/bin/note b/bin/note index 7721b1f..5be1a53 100755 --- a/bin/note +++ b/bin/note @@ -23,6 +23,8 @@ # http://www.daemon.de/note/ # +use lib qw(blib/lib); + BEGIN { # works on unix or cygwin only! my $path = $0; @@ -141,7 +143,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc"); $USER = getlogin || getpwuid($<); chomp $USER; $TOPIC = 1; -$version = "1.3.11"; +$version = "1.3.12"; $CurDepth = 1; # the current depth inside the topic "directory" structure... $maxlen = "auto"; $timelen = 22; diff --git a/note.pod b/note.pod index a39eaca..c2d6abe 100644 --- a/note.pod +++ b/note.pod @@ -535,6 +535,6 @@ Thomas Linden =head1 VERSION -1.3.10 (02/09/2012) +1.3.12 (07/19/2012) =cut