mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 12:41:10 +01:00
fixed major bug in NOTEDB::general
This commit is contained in:
@@ -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.
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -136,12 +136,15 @@ sub get_nextnum {
|
|||||||
foreach (keys %{$this->{cache}}) {
|
foreach (keys %{$this->{cache}}) {
|
||||||
$num++;
|
$num++;
|
||||||
}
|
}
|
||||||
return $num;
|
return $num;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
4
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
|
Introduction
|
||||||
@@ -214,4 +214,4 @@ and I'll add you.
|
|||||||
Last changed
|
Last changed
|
||||||
============
|
============
|
||||||
|
|
||||||
02/09/2012
|
07/19/2012
|
||||||
|
|||||||
4
bin/note
4
bin/note
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user