Comment 1 for bug 773135

Revision history for this message
fisharebest (fisharebest) wrote :

As a further explanation, at the beginning of edit_privacy.php, we apply privacy filtering to the record we are editing like this:

//-- privatize the record so that line numbers etc. match what was in the display
//-- data that is hidden because of privacy is stored in the $pgv_private_records array
//-- any private data will be restored when the record is replaced
if (isset($gedrec)) {
 $gedrec = privatize_gedcom(WT_GED_ID, $gedrec);
}

Then, later in the code, we undo the filtering, for example:

 // Cycle through each individual concerned defined by $cens_pids array.
 foreach ($cens_pids as $pid) {
  if (isset($pid)) {
   $gedrec = find_gedcom_record($pid, WT_GED_ID, true);
  } elseif (isset($famid)) {
   $gedrec = find_gedcom_record($famid, WT_GED_ID, true);
  }

There are other, more subtle cases, such as editnote, addchildaction, linkspouseaction.

I'm currently rewriting the privacy functions (which is why I found the error), and will correct these as part of the update.