Skip to content

Commit

Permalink
rm is_private_person
Browse files Browse the repository at this point in the history
  • Loading branch information
swrup committed May 25, 2023
1 parent 6a9cdb0 commit 8f7c4ea
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/api_saisie_read.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1882,20 +1882,6 @@ let print_result_fiche_person conf base ip nb_asc_max nb_desc_max simple_graph_i
Output.print_sstring conf ""
end

(* ********************************************************************* *)
(* [Fonc] is_private_person : conf -> base -> ip -> bool *)
(** [Description] : Indique si une personne est privée ou non.
[Args] :
- conf : configuration de la base
- base : base de donnée
- ip : index de la personne
[Retour] : Bool
[Rem] : Non exporté en clair hors de ce module. *)
(* ********************************************************************* *)
let is_private_person conf base ip =
let p = pget conf base ip in
is_empty_person p || ((is_hide_names conf p) && not(authorized_age conf base p))

(* ********************************************************************* *)
(* [Fonc] print_from_identifier_person : conf -> base -> *)
(* print_result_from_ip -> Identifier_person -> unit *)
Expand Down Expand Up @@ -1930,8 +1916,7 @@ let print_from_identifier_person conf base print_result_from_ip identifier_perso
begin
match Gwdb.person_of_key base fn sn (Int32.to_int oc) with
| Some ip ->
if is_private_person conf base ip
then
if Api_util.get_visibility conf base ip = `private_ then
print_error conf `not_found ""
else
(if identifier_person.Mread.Identifier_person.track_visit
Expand Down

0 comments on commit 8f7c4ea

Please sign in to comment.