diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-06-14 20:40:41 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-06-14 20:40:41 +0000 |
| commit | bcdd7bd2dc67ddfbe3f865898c2ecfe4b9efdf1e (patch) | |
| tree | bec24f4c901c8915716a7249093a0ca8161ed112 /modules | |
| parent | 48e1a78c5090a0eecd4fa14968e2b33110272b33 (diff) | |
| download | webtrees-bcdd7bd2dc67ddfbe3f865898c2ecfe4b9efdf1e.tar.gz webtrees-bcdd7bd2dc67ddfbe3f865898c2ecfe4b9efdf1e.tar.bz2 webtrees-bcdd7bd2dc67ddfbe3f865898c2ecfe4b9efdf1e.zip | |
Fix: privacy function checking wrong record
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/clippings/clippings_ctrl.php | 12 | ||||
| -rw-r--r-- | modules/yahrzeit/module.php | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/clippings/clippings_ctrl.php b/modules/clippings/clippings_ctrl.php index 97de5bfc12..fbb7305f0e 100644 --- a/modules/clippings/clippings_ctrl.php +++ b/modules/clippings/clippings_ctrl.php @@ -538,7 +538,7 @@ class ClippingsControllerRoot extends BaseController { if (!id_in_cart($clipping['id'])) {
$clipping['gedcom'] = $GEDCOM;
if ($clipping['type'] == "indi") {
- if (displayDetailsById($clipping['id']) || showLivingNameById($clipping['id'])) {
+ if (displayDetailsById($clipping['id'], 'INDI') || showLivingNameById($clipping['id'])) {
$cart[] = $clipping;
$this->addCount++;
} else {
@@ -548,7 +548,7 @@ class ClippingsControllerRoot extends BaseController { } else
if ($clipping['type'] == "fam") {
$parents = find_parents($clipping['id']);
- if ((displayDetailsById($parents['HUSB']) || showLivingNameById($parents['HUSB'])) && (displayDetailsById($parents['WIFE']) || showLivingNameById($parents['WIFE']))) {
+ if ((displayDetailsById($parents['HUSB'], 'INDI') || showLivingNameById($parents['HUSB'])) && (displayDetailsById($parents['WIFE'], 'INDI') || showLivingNameById($parents['WIFE']))) {
$cart[] = $clipping;
$this->addCount++;
} else {
@@ -571,7 +571,7 @@ class ClippingsControllerRoot extends BaseController { $gedrec = find_gedcom_record($clipping['id'], WT_GED_ID);
$st = preg_match_all("/\d SOUR @(.*)@/", $gedrec, $match, PREG_SET_ORDER);
for ($i = 0; $i < $st; $i++) {
- if (displayDetailsById($match[$i][1])) {
+ if (displayDetailsById($match[$i][1], 'SOUR')) {
// add SOUR
$clipping = array ();
$clipping['type'] = "source";
@@ -582,7 +582,7 @@ class ClippingsControllerRoot extends BaseController { $sourec = find_gedcom_record($match[$i][1], WT_GED_ID);
$rt = preg_match_all("/\d REPO @(.*)@/", $sourec, $rmatch, PREG_SET_ORDER);
for ($j = 0; $j < $rt; $j++) {
- if (displayDetailsById($rmatch[$j][1])) {
+ if (displayDetailsById($rmatch[$j][1], 'REPO')) {
$clipping = array ();
$clipping['type'] = "repository";
$clipping['id'] = $rmatch[$j][1];
@@ -594,7 +594,7 @@ class ClippingsControllerRoot extends BaseController { }
$nt = preg_match_all("/\d NOTE @(.*)@/", $gedrec, $match, PREG_SET_ORDER);
for ($i = 0; $i < $nt; $i++) {
- if (displayDetailsById($match[$i][1])) {
+ if (displayDetailsById($match[$i][1], 'NOTE')) {
$clipping = array ();
$clipping['type'] = "note";
$clipping['id'] = $match[$i][1];
@@ -605,7 +605,7 @@ class ClippingsControllerRoot extends BaseController { if ($MULTI_MEDIA) {
$nt = preg_match_all("/\d OBJE @(.*)@/", $gedrec, $match, PREG_SET_ORDER);
for ($i = 0; $i < $nt; $i++) {
- if (displayDetailsById($match[$i][1])) {
+ if (displayDetailsById($match[$i][1], 'OBJE')) {
$clipping = array ();
$clipping['type'] = "obje";
$clipping['id'] = $match[$i][1];
diff --git a/modules/yahrzeit/module.php b/modules/yahrzeit/module.php index 9c4754ec7d..00799e48d6 100644 --- a/modules/yahrzeit/module.php +++ b/modules/yahrzeit/module.php @@ -72,7 +72,7 @@ class yahrzeit_WT_Module extends WT_Module implements WT_Module_Block { // Extract hebrew dates only if ($fact['date']->date1->CALENDAR_ESCAPE()=='@#DHEBREW@' && $fact['date']->MinJD()==$fact['date']->MaxJD()) { // Apply privacy - if (displayDetailsById($fact['id']) && showFact($fact['fact'], $fact['id']) && !FactViewRestricted($fact['id'], $fact['factrec'])) { + if (displayDetailsById($fact['id'], 'INDI') && showFact($fact['fact'], $fact['id']) && !FactViewRestricted($fact['id'], $fact['factrec'])) { $yahrzeits[]=$fact; } } |
