summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/controllers/family_ctrl.php4
-rw-r--r--includes/controllers/individual_ctrl.php2
-rw-r--r--includes/controllers/media_ctrl.php3
-rw-r--r--includes/controllers/note_ctrl.php4
-rw-r--r--includes/controllers/repository_ctrl.php4
-rw-r--r--includes/controllers/source_ctrl.php4
-rw-r--r--note.php20
7 files changed, 19 insertions, 22 deletions
diff --git a/includes/controllers/family_ctrl.php b/includes/controllers/family_ctrl.php
index 0611e9a17e..bd8e0534d8 100644
--- a/includes/controllers/family_ctrl.php
+++ b/includes/controllers/family_ctrl.php
@@ -86,6 +86,8 @@ class FamilyController extends BaseController {
$this->famrec = $this->family->getGedcomRecord();
$this->display = $this->family->canDisplayName();
+ $this->famid=$this->family->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
@@ -161,7 +163,7 @@ class FamilyController extends BaseController {
}
if ($this->showLivingHusb == false && $this->showLivingWife == false) {
- print_header(i18n::translate('Private')." ".i18n::translate('Family information'));
+ print_header(i18n::translate('Family'));
print_privacy_error();
print_footer();
exit;
diff --git a/includes/controllers/individual_ctrl.php b/includes/controllers/individual_ctrl.php
index 0bad5e33e4..593894bb98 100644
--- a/includes/controllers/individual_ctrl.php
+++ b/includes/controllers/individual_ctrl.php
@@ -100,6 +100,8 @@ class IndividualController extends BaseController {
return false;
}
+ $this->$pid=$this->indi->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
diff --git a/includes/controllers/media_ctrl.php b/includes/controllers/media_ctrl.php
index be10a9c813..8eac30f987 100644
--- a/includes/controllers/media_ctrl.php
+++ b/includes/controllers/media_ctrl.php
@@ -99,9 +99,10 @@ class MediaController extends BaseController{
}
if (is_null($this->mediaobject)) return false;
-
$this->mediaobject->ged_id=WT_GED_ID; // This record is from a file
+ $this->mid=$this->mediaobject->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
diff --git a/includes/controllers/note_ctrl.php b/includes/controllers/note_ctrl.php
index afbf98d810..bf3c8d923f 100644
--- a/includes/controllers/note_ctrl.php
+++ b/includes/controllers/note_ctrl.php
@@ -59,7 +59,7 @@ class NoteController extends BaseController {
$this->note->ged_id=WT_GED_ID; // This record is from a file
if (!$this->note->canDisplayDetails()) {
- print_header(i18n::translate('Private')." ".i18n::translate('Shared Note Information'));
+ print_header(i18n::translate('Shared note'));
print_privacy_error();
print_footer();
exit;
@@ -67,6 +67,8 @@ class NoteController extends BaseController {
$this->uname = WT_USER_NAME;
+ $this->nid=$this->note->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
diff --git a/includes/controllers/repository_ctrl.php b/includes/controllers/repository_ctrl.php
index 975d76af0a..6f0ece4e4a 100644
--- a/includes/controllers/repository_ctrl.php
+++ b/includes/controllers/repository_ctrl.php
@@ -59,7 +59,7 @@ class RepositoryController extends BaseController {
$this->repository->ged_id=WT_GED_ID; // This record is from a file
if (!$this->repository->canDisplayDetails()) {
- print_header(i18n::translate('Private')." ".i18n::translate('Repository information'));
+ print_header(i18n::translate('Repository'));
print_privacy_error();
print_footer();
exit;
@@ -67,6 +67,8 @@ class RepositoryController extends BaseController {
$this->uname = WT_USER_NAME;
+ $this->rid=$this->repository->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
diff --git a/includes/controllers/source_ctrl.php b/includes/controllers/source_ctrl.php
index 1257a9fa7a..a100a997dc 100644
--- a/includes/controllers/source_ctrl.php
+++ b/includes/controllers/source_ctrl.php
@@ -59,7 +59,7 @@ class SourceController extends BaseController {
$this->source->ged_id=WT_GED_ID; // This record is from a file
if (!$this->source->canDisplayDetails()) {
- print_header(i18n::translate('Private')." ".i18n::translate('Source Information'));
+ print_header(i18n::translate('Source'));
print_privacy_error();
print_footer();
exit;
@@ -67,6 +67,8 @@ class SourceController extends BaseController {
$this->uname = WT_USER_NAME;
+ $this->sid=$this->source->getXref(); // Correct upper/lower case mismatch
+
//-- perform the desired action
switch($this->action) {
case 'addfav':
diff --git a/note.php b/note.php
index ccceeac8e1..d3a41f77ba 100644
--- a/note.php
+++ b/note.php
@@ -40,6 +40,9 @@ $nonfacts = array();
$controller=new NoteController();
$controller->init();
+// Tell addmedia.php what to link to
+$linkToID=$controller->nid;
+
print_header($controller->getPageTitle());
// LightBox
@@ -58,22 +61,6 @@ else if ($controller->note->isMarkedDeleted()) {
echo '<span class="error">', i18n::translate('This record has been marked for deletion upon admin approval.'), '</span>';
}
-// Tell addmedia.php what to link to
-$note=Note::getInstance($controller->nid);
-if ($note) {
- $noterec=$note->getGedcomRecord();
- $pnoterec = privatize_gedcom($note->getGedcomRecord());
- preg_match("/$controller->nid/i", $noterec, $notematch);
- $linkToID=$notematch[0];
-}
-
-// If note is private to current logged in user
-if ($noterec!=$pnoterec) {
- print_privacy_error();
- print_footer();
- exit;
-}
-
echo WT_JS_START;
echo 'function show_gedcom_record() {';
echo ' var recwin=window.open("gedrecord.php?pid=', $controller->nid, '", "_blank", "top=0, left=0, width=600, height=400, scrollbars=1, scrollable=1, resizable=1");';
@@ -148,7 +135,6 @@ if ($controller->userCanEdit()) {
}
echo '</table><br /><br /></td></tr><tr class="center"><td colspan="2">';
-
// Individuals linked to this shared note
if ($controller->note->countLinkedIndividuals()) {
print_indi_table($controller->note->fetchLinkedIndividuals(), $controller->note->getFullName());