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

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