diff options
| -rw-r--r-- | edit_privacy.php | 10 | ||||
| -rw-r--r-- | help_text.php | 5 | ||||
| -rw-r--r-- | includes/controllers/search_ctrl.php | 2 | ||||
| -rw-r--r-- | includes/functions/functions.php | 2 | ||||
| -rw-r--r-- | includes/functions/functions_edit.php | 35 | ||||
| -rw-r--r-- | includes/functions/functions_privacy.php | 50 | ||||
| -rw-r--r-- | privacy.php | 9 |
7 files changed, 38 insertions, 75 deletions
diff --git a/edit_privacy.php b/edit_privacy.php index 5989b49b88..26f36309ab 100644 --- a/edit_privacy.php +++ b/edit_privacy.php @@ -166,7 +166,6 @@ if ($action=="update") { $configtext = preg_replace('/\$SHOW_MULTISITE_SEARCH\s*=\s*.*;/', "\$SHOW_MULTISITE_SEARCH = ".$_POST["v_SHOW_MULTISITE_SEARCH"].";", $configtext); $configtext = preg_replace('/\$ENABLE_CLIPPINGS_CART\s*=\s*.*;/', "\$ENABLE_CLIPPINGS_CART = ".$_POST["v_ENABLE_CLIPPINGS_CART"].";", $configtext); $configtext = preg_replace('/\$PRIVACY_BY_YEAR\s*=\s*.*;/', "\$PRIVACY_BY_YEAR = ".$boolarray[$_POST["v_PRIVACY_BY_YEAR"]].";", $configtext); - $configtext = preg_replace('/\$PRIVACY_BY_RESN\s*=\s*.*;/', "\$PRIVACY_BY_RESN = ".$boolarray[$_POST["v_PRIVACY_BY_RESN"]].";", $configtext); $configtext = preg_replace('/\$SHOW_DEAD_PEOPLE\s*=\s*.*;/', "\$SHOW_DEAD_PEOPLE = ".$_POST["v_SHOW_DEAD_PEOPLE"].";", $configtext); $configtext = preg_replace('/\$USE_RELATIONSHIP_PRIVACY\s*=\s*.*;/', "\$USE_RELATIONSHIP_PRIVACY = ".$boolarray[$_POST["v_USE_RELATIONSHIP_PRIVACY"]].";", $configtext); $configtext = preg_replace('/\$MAX_RELATION_PATH_LENGTH\s*=\s*.*;/', "\$MAX_RELATION_PATH_LENGTH = \"".$_POST["v_MAX_RELATION_PATH_LENGTH"]."\";", $configtext); @@ -346,15 +345,6 @@ if ($action=="update") { <tr> <td class="descriptionbox wrap"> - <?php echo i18n::translate('Use GEDCOM (RESN) privacy restriction'), help_link('PRIVACY_BY_RESN'); ?> - </td> - <td class="optionbox"> - <select size="1" name="v_PRIVACY_BY_RESN"><?php write_yes_no($PRIVACY_BY_RESN); ?></select> - </td> - </tr> - - <tr> - <td class="descriptionbox wrap"> <?php echo i18n::translate('Show private relationships'), help_link('SHOW_PRIVATE_RELATIONSHIPS'); ?> </td> <td class="optionbox"> diff --git a/help_text.php b/help_text.php index 1ffc214c48..08520f2d03 100644 --- a/help_text.php +++ b/help_text.php @@ -2566,11 +2566,6 @@ case 'PREFER_LEVEL2_SOURCES': $text=i18n::translate('When adding new close relatives, you can add source citations to the records (e.g. INDI, FAM) or the facts (BIRT, MARR, DEAT). This option controls which checkboxes are ticked by default.'); break; -case 'PRIVACY_BY_RESN': - $title=i18n::translate('Use GEDCOM (RESN) privacy restriction'); - $text=i18n::translate('The GEDCOM 5.5.1 specification includes the option of using RESN tags to set Privacy options for people and facts in the GEDCOM file. Enabling this option will tell the program to look for level 1 RESN tags in GEDCOM records. Level 2+ RESN tags are automatically applied and will not be affected by this setting. Note that this might slow down some of the functions of <b>webtrees</b> such as the Individual list.'); - break; - case 'PRIVACY_BY_YEAR': $title=i18n::translate('Limit privacy by age of event'); $text=i18n::translate('The <b>Limit Privacy by age of event</b> setting will hide the details of people based on how old they were at specific events regardless of whether they are dead or alive.<br /><br />Use this setting along with the <b>Age at which to assume a person is dead</b> setting. For example, if you made the Age setting 100 and set this option to <b>Yes</b>, all persons, alive or dead, born less than 100 years ago would be set to private. People who were married less than 85 years ago and people who died less than 75 years ago would also be marked as private. Please note that using this option will slow down your performance somewhat.'); diff --git a/includes/controllers/search_ctrl.php b/includes/controllers/search_ctrl.php index 6c7f86588f..f2fb1ff317 100644 --- a/includes/controllers/search_ctrl.php +++ b/includes/controllers/search_ctrl.php @@ -733,7 +733,7 @@ class SearchControllerRoot extends BaseController { global $GEDCOM, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $global_facts; //-- all privacy settings must be global if we are going to load up privacy files global $SHOW_DEAD_PEOPLE,$SHOW_LIVING_NAMES,$SHOW_SOURCES,$MAX_ALIVE_AGE,$USE_RELATIONSHIP_PRIVACY,$MAX_RELATION_PATH_LENGTH; - global $CHECK_MARRIAGE_RELATIONS,$PRIVACY_BY_YEAR,$PRIVACY_BY_RESN,$SHOW_PRIVATE_RELATIONSHIPS,$person_privacy,$user_privacy; + global $CHECK_MARRIAGE_RELATIONS,$PRIVACY_BY_YEAR,$SHOW_PRIVATE_RELATIONSHIPS,$person_privacy,$user_privacy; global $global_facts,$person_facts; $somethingPrinted = false; // whether anything printed // ---- section to search and display results on a general keyword search diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 14fbc5a395..01727ce4bd 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -270,7 +270,7 @@ function load_privacy_file($ged_id=WT_GED_ID) { global $SHOW_DEAD_PEOPLE, $SHOW_LIVING_NAMES, $SHOW_SOURCES, $MAX_ALIVE_AGE; global $ENABLE_CLIPPINGS_CART, $SHOW_MULTISITE_SEARCH; global $USE_RELATIONSHIP_PRIVACY, $MAX_RELATION_PATH_LENGTH, $CHECK_MARRIAGE_RELATIONS; - global $PRIVACY_BY_YEAR, $PRIVACY_BY_RESN, $SHOW_PRIVATE_RELATIONSHIPS; + global $PRIVACY_BY_YEAR, $SHOW_PRIVATE_RELATIONSHIPS; global $person_privacy, $user_privacy, $global_facts, $person_facts; // Load default settings diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php index 0ca9185ba2..427c856800 100644 --- a/includes/functions/functions_edit.php +++ b/includes/functions/functions_edit.php @@ -1099,7 +1099,7 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= global $tags, $emptyfacts, $main_fact, $TEXT_DIRECTION; global $NPFX_accept, $SPFX_accept, $NSFX_accept, $FILE_FORM_accept, $upload_count; global $tabkey, $STATUS_CODES, $SPLIT_PLACES, $pid, $gender, $linkToID; - global $bdm, $PRIVACY_BY_RESN; + global $bdm; global $QUICK_REQUIRED_FACTS, $QUICK_REQUIRED_FAMFACTS, $PREFER_LEVEL2_SOURCES; global $action, $event_add; global $CensDate, $MEDIA_TYPES; @@ -1444,10 +1444,6 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= //--> </script> <?php - if (!$PRIVACY_BY_RESN && $level==1) { - // warn user that level 1 RESN tags have no effect when PRIVACY_BY_RESN is false - echo "<small>", i18n::translate('Note: You must enable the \'Use GEDCOM (RESN) Privacy restriction\' feature for this setting to take effect.'), "</small>"; - } echo "<input type=\"hidden\" id=\"", $element_id, "\" name=\"", $element_name, "\" value=\"", $value, "\" />\n"; echo "<table><tr valign=\"top\">\n"; foreach (array( @@ -1724,7 +1720,7 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= */ function print_add_layer($tag, $level=2, $printSaveButton=true) { global $WT_IMAGE_DIR, $WT_IMAGES; - global $MEDIA_DIRECTORY, $TEXT_DIRECTION, $PRIVACY_BY_RESN; + global $MEDIA_DIRECTORY, $TEXT_DIRECTION; global $gedrec, $FULL_SOURCES; global $islink; if ($tag=="SOUR") { @@ -1821,22 +1817,17 @@ function print_add_layer($tag, $level=2, $printSaveButton=true) { echo "</table></div>"; } if ($tag=="RESN") { - if (!$PRIVACY_BY_RESN && $level==1) { - // PRIVACY_BY_RESN is not active for level 1 tags - // do not display - } else { - //-- Retrieve existing resn or add new resn to fact - $text = ''; - echo "<a href=\"javascript:;\" onclick=\"return expand_layer('newresn');\"><img id=\"newresn_img\" src=\"", $WT_IMAGE_DIR, "/", $WT_IMAGES["plus"]["other"], "\" border=\"0\" width=\"11\" height=\"11\" alt=\"\" title=\"\" /> ", translate_fact('RESN'), "</a>"; - echo help_link('RESN'); - echo "<br />\n"; - echo "<div id=\"newresn\" style=\"display: none;\">\n"; - if ($printSaveButton) echo "<input type=\"submit\" value=\"", i18n::translate('Save'), "\" />"; - echo "<table class=\"facts_table center $TEXT_DIRECTION\">\n"; - // 2 RESN - add_simple_tag(($level)." RESN ".$text); - echo "</table></div>"; - } + //-- Retrieve existing resn or add new resn to fact + $text = ''; + echo "<a href=\"javascript:;\" onclick=\"return expand_layer('newresn');\"><img id=\"newresn_img\" src=\"", $WT_IMAGE_DIR, "/", $WT_IMAGES["plus"]["other"], "\" border=\"0\" width=\"11\" height=\"11\" alt=\"\" title=\"\" /> ", translate_fact('RESN'), "</a>"; + echo help_link('RESN'); + echo "<br />\n"; + echo "<div id=\"newresn\" style=\"display: none;\">\n"; + if ($printSaveButton) echo "<input type=\"submit\" value=\"", i18n::translate('Save'), "\" />"; + echo "<table class=\"facts_table center $TEXT_DIRECTION\">\n"; + // 2 RESN + add_simple_tag(($level)." RESN ".$text); + echo "</table></div>"; } } diff --git a/includes/functions/functions_privacy.php b/includes/functions/functions_privacy.php index a327d0b2b6..6550e5695f 100644 --- a/includes/functions/functions_privacy.php +++ b/includes/functions/functions_privacy.php @@ -345,7 +345,7 @@ function checkPrivacyByYear($pid) { function displayDetailsById($pid, $type = "INDI", $sitemap = false) { global $USE_RELATIONSHIP_PRIVACY, $CHECK_MARRIAGE_RELATIONS, $MAX_RELATION_PATH_LENGTH; global $global_facts, $person_privacy, $user_privacy, $HIDE_LIVE_PEOPLE, $GEDCOM, $SHOW_DEAD_PEOPLE, $MAX_ALIVE_AGE, $PRIVACY_BY_YEAR; - global $PRIVACY_CHECKS, $PRIVACY_BY_RESN, $SHOW_SOURCES, $SHOW_LIVING_NAMES, $INDEX_DIRECTORY; + global $PRIVACY_CHECKS, $SHOW_SOURCES, $SHOW_LIVING_NAMES, $INDEX_DIRECTORY; global $GEDCOM; $ged_id=get_id_from_gedcom($GEDCOM); @@ -436,23 +436,21 @@ function displayDetailsById($pid, $type = "INDI", $sitemap = false) { } //-- look for an Ancestral File RESN (restriction) tag - if (isset($PRIVACY_BY_RESN) && ($PRIVACY_BY_RESN==true)) { - $gedrec = find_gedcom_record($pid, $ged_id); - $resn = get_gedcom_value("RESN", 1, $gedrec); - if (!empty($resn)) { - if ($resn == "confidential") { - $ret = false; - } elseif ($resn=="privacy" && $pgv_USER_GEDCOM_ID != $pid) { - $ret = false; - } else { - $ret = true; - } - if (!$ret) { - if ($cache_privacy) { - $privacy_cache[$pkey] = $ret; - } - return $ret; + $gedrec = find_gedcom_record($pid, $ged_id); + $resn = get_gedcom_value("RESN", 1, $gedrec); + if (!empty($resn)) { + if ($resn == "confidential") { + $ret = false; + } elseif ($resn=="privacy" && $pgv_USER_GEDCOM_ID != $pid) { + $ret = false; + } else { + $ret = true; + } + if (!$ret) { + if ($cache_privacy) { + $privacy_cache[$pkey] = $ret; } + return $ret; } } @@ -538,16 +536,14 @@ function displayDetailsById($pid, $type = "INDI", $sitemap = false) { } //-- look for an Ancestral File RESN (restriction) tag - if (isset($PRIVACY_BY_RESN) && ($PRIVACY_BY_RESN==true)) { - $gedrec = find_gedcom_record($pid, $ged_id); - $resn = get_gedcom_value("RESN", 1, $gedrec); - if ($resn == "none") { - if ($cache_privacy) $privacy_cache[$pkey] = true; - return true; - } else if (!empty($resn)) { - if ($cache_privacy) $privacy_cache[$pkey] = false; - return false; - } + $gedrec = find_gedcom_record($pid, $ged_id); + $resn = get_gedcom_value("RESN", 1, $gedrec); + if ($resn == "none") { + if ($cache_privacy) $privacy_cache[$pkey] = true; + return true; + } else if (!empty($resn)) { + if ($cache_privacy) $privacy_cache[$pkey] = false; + return false; } if ($type=="INDI") { diff --git a/privacy.php b/privacy.php index 7698f37f36..891677c228 100644 --- a/privacy.php +++ b/privacy.php @@ -168,15 +168,6 @@ $CHECK_MARRIAGE_RELATIONS = true; $PRIVACY_BY_YEAR = false; /** - * Check for RESN privacy restrictions - * - * This setting tells the privacy functions to look inside the gedcom record for a RESN restriction tag. - * The RESN tag was used by Ancestral File as a way of marking a record as private. - * @global boolean $PRIVACY_BY_RESN - */ -$PRIVACY_BY_RESN = false; - -/** * When privatizing a gedom record should the relationship links be left in or stripped out * @global boolean $SHOW_PRIVATE_RELATIONSHIPS */ |
