Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e194aff
compile with witness notes
Sep 30, 2022
8e2203d
compile with witness notes (family)
Nov 16, 2022
aea5a88
add wnote to api
Jan 9, 2023
10c53a8
properly handle wnote from pevents
Jan 12, 2023
2149fbc
properly handle wnotes from fevents
Jan 12, 2023
c958483
api read witness notes in fiche
Jan 13, 2023
27c4430
handling notes in api_saisie_read
Jan 16, 2023
2e90ac7
optional wnotes
Jan 25, 2023
bde4dd6
fix
Jan 25, 2023
2628601
gogo
Mar 2, 2023
92a7643
bidule
Mar 2, 2023
44eff6b
yolo
Mar 2, 2023
e33f303
yololo
Mar 2, 2023
e7e1047
yolololo
Mar 2, 2023
871e469
hahahaha
Mar 2, 2023
52127bf
hahahaha2
Mar 2, 2023
5a51609
fix
Mar 2, 2023
5763dd9
fixix
Mar 2, 2023
d0b09bb
event
Mar 2, 2023
b8d4e45
more fix
Mar 2, 2023
0065f97
fixouille
Mar 2, 2023
f1bb5f1
cestfun
Mar 2, 2023
e902429
fax
Mar 2, 2023
657c07c
yey
Mar 2, 2023
455c210
fafafafaf
Mar 2, 2023
6eb0646
fafafafafzaezr
Mar 2, 2023
5a6221e
unused open
Mar 2, 2023
bc7587f
ty error
Mar 2, 2023
9a30e65
clean
Mar 2, 2023
bea9077
fix
Mar 6, 2023
eb28738
fixe
Mar 6, 2023
c738f6a
foux
Mar 6, 2023
93bfeb1
remove base from api_get_config
Mar 7, 2023
93b440c
fix
Mar 7, 2023
36e7943
fixe
Mar 7, 2023
5bd8583
fix2
Mar 7, 2023
adb73e2
update to calendars changes
Apr 13, 2023
aa47cbd
add merlin file
Apr 21, 2023
fa4237b
fix auto complete order
Apr 24, 2023
7acf5f1
fix
Jun 5, 2023
0990394
is_hidden -> is_empty_person
Feb 20, 2023
bfbc671
use variant for visible_for_visitors
Feb 22, 2023
00b5e16
use is_fully_visible_to_visitors
Feb 22, 2023
b37771e
rm is_private_person
May 25, 2023
b0c391c
add is_contemporary
Jun 26, 2023
199e41a
return is_contemporary for fiche person
Oct 26, 2023
2795558
return is_contemporary for fiche person
Oct 26, 2023
c4f9960
fix visibility
Aug 3, 2023
9720d23
Merge pull request #24 from geneanet/private-fix
canonici Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .merlin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PKG geneweb
16 changes: 8 additions & 8 deletions src/api.ml
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,14 @@ let print_last_modified_persons conf base =
| Some range ->
let date_begin = range.M.Filter_date_range.date_begin in
let dmy1 =
{ day = Int32.to_int date_begin.M.Filter_date.day;
Date.{ day = Int32.to_int date_begin.M.Filter_date.day;
month = Int32.to_int date_begin.M.Filter_date.month;
year = Int32.to_int date_begin.M.Filter_date.year;
prec = Sure; delta = 0 }
in
let date_end = range.M.Filter_date_range.date_end in
let dmy2 =
{ day = Int32.to_int date_end.M.Filter_date.day;
Date.{ day = Int32.to_int date_end.M.Filter_date.day;
month = Int32.to_int date_end.M.Filter_date.month;
year = Int32.to_int date_end.M.Filter_date.year;
prec = Sure; delta = 0 }
Expand All @@ -308,9 +308,9 @@ let print_last_modified_persons conf base =
let m = int_of_string (String.sub time 5 2) in
let d = int_of_string (String.sub time 8 2) in
let dmy =
{ day = d; month = m; year = y; prec = Sure; delta = 0; }
Date.{ day = d; month = m; year = y; prec = Sure; delta = 0; }
in
Some (Dgreg (dmy, Dgregorian))
Some (Date.Dgreg (dmy, Dgregorian))
in
is_date_included prec date date_begin date_end
| None -> true
Expand All @@ -324,11 +324,11 @@ let print_last_modified_persons conf base =
let m = int_of_string (String.sub time 5 2) in
let d = int_of_string (String.sub time 8 2) in
let dmy =
{ day = d; month = m; year = y; prec = Sure; delta = 0; }
Date.{ day = d; month = m; year = y; prec = Sure; delta = 0; }
in
Some (Dgreg (dmy, Dgregorian))
Some (Date.Dgreg (dmy, Dgregorian))
in
let dmy_zero = { day = 1; month = 1; year = 1970; prec = Sure; delta = 0; } in
let dmy_zero = Date.{ day = 1; month = 1; year = 1970; prec = Sure; delta = 0; } in
is_date_included prec date dmy_zero date_begin
| None -> true
in
Expand Down Expand Up @@ -649,7 +649,7 @@ let print_base_warnings conf base =
in
let result =
(* Make the warning list uniq *)
Hashtbl.fold begin fun x _ acc ->
Hashtbl.fold begin fun (x : CheckItem.base_warning) _ acc ->
Api_warnings.add_warning_to_piqi_warning_list conf base acc x
end warnings result
in
Expand Down
4 changes: 2 additions & 2 deletions src/api_def.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type filters =
only_recent : bool;
filter_sex : Def.sex option;
nb_results : bool;
date_birth : (dmy * dmy * bool) option;
date_death : (dmy * dmy * bool) option;
date_birth : (Date.dmy * Date.dmy * bool) option;
date_death : (Date.dmy * Date.dmy * bool) option;
}
;;

Expand Down
38 changes: 20 additions & 18 deletions src/api_graph.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ let pevents_aux conf base filter acc p =
begin
{ M.Event_query_result.p = pers_to_piqi_person p
; sp = None
; pevent_name = Some (Api_piqi_util.piqi_pevent_name_of_pevent_name e.epers_name)
; pevent_name = Some (Api_piqi_util.piqi_pevent_name_of_pevent_name (get_pevent_name e))
; fevent_name = None
; date = piqi_date_of_date @@ Date.date_of_cdate e.epers_date
; place = sou base e.epers_place
; note = sou base e.epers_note
; src = sou base e.epers_src
; date = piqi_date_of_date @@ Date.date_of_cdate (get_pevent_date e)
; place = sou base (get_pevent_place e)
; note = sou base (get_pevent_note e)
; src = sou base (get_pevent_src e)
} :: acc
end
else acc
Expand All @@ -92,11 +92,11 @@ let fevents_aux conf base filter acc f =
{ M.Event_query_result.p = pers_to_piqi_person @@ poi base @@ Gwdb.get_father f
; sp = Some (pers_to_piqi_person @@ poi base @@ Gwdb.get_mother f)
; pevent_name = None
; fevent_name = Some (Api_piqi_util.piqi_fevent_name_of_fevent_name e.efam_name)
; date = piqi_date_of_date @@ Date.date_of_cdate e.efam_date
; place = sou base e.efam_place
; note = sou base e.efam_note
; src = sou base e.efam_src
; fevent_name = Some (Api_piqi_util.piqi_fevent_name_of_fevent_name (get_fevent_name e))
; date = piqi_date_of_date @@ Date.date_of_cdate (get_fevent_date e)
; place = sou base (get_fevent_place e)
; note = sou base (get_fevent_note e)
; src = sou base (get_fevent_src e)
} :: acc
else acc
end acc events
Expand All @@ -110,8 +110,9 @@ let events_filters_aux params =
let b = date_of_piqi_date b in
fun d ->
begin
try Date.compare_date ~strict:true d b >= 0
with Date.Not_comparable -> false
match Date.compare_date_strict d b with
| None -> false
| Some v -> v >= 0
end
| None -> fun _ -> true
in
Expand All @@ -121,19 +122,20 @@ let events_filters_aux params =
let b = date_of_piqi_date b in
fun d ->
begin
try Date.compare_date ~strict:true d b <= 0
with Date.Not_comparable -> false
match Date.compare_date_strict d b with
| None -> false
| Some v -> v <= 0
end
| None -> fun _ -> true
in
( (fun e ->
List.mem e.epers_name filter_pevents
&& match Date.od_of_cdate e.epers_date with
List.mem (get_pevent_name e) filter_pevents
&& match Date.od_of_cdate (get_pevent_date e) with
| Some d -> filter_start_date d && filter_stop_date d
| None -> false)
, (fun e ->
List.mem e.efam_name filter_fevents
&& match Date.od_of_cdate e.efam_date with
List.mem (get_fevent_name e) filter_fevents
&& match Date.od_of_cdate (get_fevent_date e) with
| Some d -> filter_start_date d && filter_stop_date d
| None -> false)
)
Expand Down
1 change: 1 addition & 0 deletions src/api_piqi_util.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
open Geneweb
open Def
open Date
open Config

let p_getenvbin env label =
Expand Down
9 changes: 4 additions & 5 deletions src/api_saisie_autocomplete.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open Geneweb
open Config
open Def
open Gwdb
open Util

Expand All @@ -27,25 +26,25 @@ let create_cache base mode cache_file =
Gwdb.Collection.fold
(fun acc p ->
List.fold_left
(fun acc e -> add acc e.epers_place) acc (get_pevents p) )
(fun acc e -> add acc (get_pevent_place e)) acc (get_pevents p) )
IstrSet.empty (Gwdb.persons base)
in
Gwdb.Collection.fold
(fun acc f -> List.fold_left (fun acc e -> add acc e.efam_place) acc (get_fevents f) )
(fun acc f -> List.fold_left (fun acc e -> add acc (get_fevent_place e)) acc (get_fevents f) )
acc (Gwdb.families base)
| `source ->
let acc =
Gwdb.Collection.fold
(fun acc p ->
let acc = add acc (get_psources p) in
List.fold_left (fun acc e -> add acc e.epers_src) acc (get_pevents p) )
List.fold_left (fun acc e -> add acc (get_pevent_src e)) acc (get_pevents p) )
IstrSet.empty
(Gwdb.persons base)
in
Gwdb.Collection.fold
(fun acc f ->
let acc = add acc (get_fsources f) in
List.fold_left (fun acc e -> add acc e.efam_src) acc (get_fevents f) )
List.fold_left (fun acc e -> add acc (get_fevent_src e)) acc (get_fevents f) )
acc
(Gwdb.families base)
in
Expand Down
Loading