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: 1.3.11:
FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code. FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code.
================================================================================ ================================================================================

View File

@@ -4,7 +4,7 @@
package NOTEDB::general; package NOTEDB::general;
$NOTEDB::general::VERSION = "1.02"; $NOTEDB::general::VERSION = "1.03";
use strict; use strict;
#use Data::Dumper; #use Data::Dumper;
@@ -140,8 +140,11 @@ sub get_nextnum {
} }
my %data = $this->get_all(); my %data = $this->get_all();
my $size = scalar keys %data; my @numbers = sort { $a <=> $b } keys %data;
$num = $size + 1; $num = pop @numbers;
$num++;
return $num;
return $num; return $num;
} }

View File

@@ -124,10 +124,6 @@ sub get_nextnum {
my @numbers = sort { $a <=> $b } keys %{$this->{cache}}; my @numbers = sort { $a <=> $b } keys %{$this->{cache}};
$num = pop @numbers; $num = pop @numbers;
$num++; $num++;
#$num = 1;
#foreach (keys %{$this->{cache}}) {
# $num++;
#}
return $num; return $num;
} }
@@ -135,8 +131,6 @@ sub get_nextnum {
my @numbers = sort { $a <=> $b } keys %data; my @numbers = sort { $a <=> $b } keys %data;
$num = pop @numbers; $num = pop @numbers;
$num++; $num++;
#my $size = scalar keys %data;
#$num = $size + 1;
return $num; 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 Introduction
@@ -214,4 +214,4 @@ and I'll add you.
Last changed Last changed
============ ============
02/09/2012 07/19/2012

View File

@@ -23,6 +23,8 @@
# http://www.daemon.de/note/ # http://www.daemon.de/note/
# #
use lib qw(blib/lib);
BEGIN { BEGIN {
# works on unix or cygwin only! # works on unix or cygwin only!
my $path = $0; my $path = $0;
@@ -141,7 +143,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
$USER = getlogin || getpwuid($<); $USER = getlogin || getpwuid($<);
chomp $USER; chomp $USER;
$TOPIC = 1; $TOPIC = 1;
$version = "1.3.11"; $version = "1.3.12";
$CurDepth = 1; # the current depth inside the topic "directory" structure... $CurDepth = 1; # the current depth inside the topic "directory" structure...
$maxlen = "auto"; $maxlen = "auto";
$timelen = 22; $timelen = 22;

View File

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