fixed major bug in NOTEDB::general

This commit is contained in:
TLINDEN
2012-07-19 09:51:39 +02:00
parent 5e99b88562
commit c124859f97
6 changed files with 17 additions and 14 deletions

View File

@@ -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.
================================================================================

View File

@@ -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;
}

View File

@@ -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;
}

4
README
View File

@@ -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

View File

@@ -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;

View File

@@ -535,6 +535,6 @@ Thomas Linden <tom at linden dot at>
=head1 VERSION
1.3.10 (02/09/2012)
1.3.12 (07/19/2012)
=cut