summaryrefslogtreecommitdiff
path: root/library/WT/Controller
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-10-22 10:06:01 +0100
committerGreg Roach <fisharebest@gmail.com>2014-10-22 10:06:01 +0100
commit0133fb2decdc4ff534f8c5859085b8d8f85fca42 (patch)
tree9c920691a240bf88a93fc73b71d034e15f5acc6f /library/WT/Controller
parent02f1b13aaaa0b080b8360e3bf704ee87cb56bdd1 (diff)
downloadwebtrees-0133fb2decdc4ff534f8c5859085b8d8f85fca42.tar.gz
webtrees-0133fb2decdc4ff534f8c5859085b8d8f85fca42.tar.bz2
webtrees-0133fb2decdc4ff534f8c5859085b8d8f85fca42.zip
Better description of variable names
Diffstat (limited to 'library/WT/Controller')
-rw-r--r--library/WT/Controller/Family.php2
-rw-r--r--library/WT/Controller/GedcomRecord.php4
-rw-r--r--library/WT/Controller/Individual.php16
-rw-r--r--library/WT/Controller/Media.php2
-rw-r--r--library/WT/Controller/Note.php2
-rw-r--r--library/WT/Controller/Repository.php2
-rw-r--r--library/WT/Controller/Source.php2
7 files changed, 15 insertions, 15 deletions
diff --git a/library/WT/Controller/Family.php b/library/WT/Controller/Family.php
index 03e6a31684..5f881f5e3a 100644
--- a/library/WT/Controller/Family.php
+++ b/library/WT/Controller/Family.php
@@ -75,7 +75,7 @@ class WT_Controller_Family extends WT_Controller_GedcomRecord {
$SHOW_GEDCOM_RECORD = $WT_TREE->getPreference('SHOW_GEDCOM_RECORD');
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}
diff --git a/library/WT/Controller/GedcomRecord.php b/library/WT/Controller/GedcomRecord.php
index 6fc63883cc..d15197d54e 100644
--- a/library/WT/Controller/GedcomRecord.php
+++ b/library/WT/Controller/GedcomRecord.php
@@ -26,7 +26,7 @@ class WT_Controller_GedcomRecord extends WT_Controller_Page {
if ($this->record && $this->record->canEdit()) {
$broken_links=0;
foreach ($this->record->getFacts('HUSB|WIFE|CHIL|FAMS|FAMC|REPO') as $fact) {
- if (!$fact->isOld() && $fact->getTarget() === null) {
+ if (!$fact->isPendingDeletion() && $fact->getTarget() === null) {
$this->record->deleteFact($fact->getFactId(), false);
WT_FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ WT_I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $this->record->getFullName(), $fact->getValue()));
$broken_links = true;
@@ -34,7 +34,7 @@ class WT_Controller_GedcomRecord extends WT_Controller_Page {
}
foreach ($this->record->getFacts('NOTE|SOUR|OBJE') as $fact) {
// These can be links or inline. Only delete links.
- if (!$fact->isOld() && $fact->getTarget() === null && preg_match('/^@.*@$/', $fact->getValue())) {
+ if (!$fact->isPendingDeletion() && $fact->getTarget() === null && preg_match('/^@.*@$/', $fact->getValue())) {
$this->record->deleteFact($fact->getFactId(), false);
WT_FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ WT_I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $this->record->getFullName(), $fact->getValue()));
$broken_links = true;
diff --git a/library/WT/Controller/Individual.php b/library/WT/Controller/Individual.php
index 3fc9259e5a..7b7cb82b28 100644
--- a/library/WT/Controller/Individual.php
+++ b/library/WT/Controller/Individual.php
@@ -129,10 +129,10 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord {
$this->name_count++;
if ($this->name_count >1) { echo '<h3 class="name_two">',$dummy->getFullName(), '</h3>'; } //Other names accordion element
echo '<div class="indi_name_details';
- if ($event->isOld()) {
+ if ($event->isPendingDeletion()) {
echo ' old';
}
- if ($event->isNew()) {
+ if ($event->isPendingAddition()) {
echo ' new';
}
echo '">';
@@ -149,7 +149,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord {
}
}
}
- if ($this->record->canEdit() && !$event->isOld()) {
+ if ($this->record->canEdit() && !$event->isPendingDeletion()) {
echo "<div class=\"deletelink\"><a class=\"deleteicon\" href=\"#\" onclick=\"return delete_fact('".WT_I18N::translate('Are you sure you want to delete this fact?')."', '".$this->record->getXref()."', '".$event->getFactId()."');\" title=\"".WT_I18N::translate('Delete this name')."\"><span class=\"link_text\">".WT_I18N::translate('Delete this name')."</span></a></div>";
echo "<div class=\"editlink\"><a href=\"#\" class=\"editicon\" onclick=\"edit_name('".$this->record->getXref()."', '".$event->getFactId()."'); return false;\" title=\"".WT_I18N::translate('Edit name')."\"><span class=\"link_text\">".WT_I18N::translate('Edit name')."</span></a></div>";
}
@@ -209,10 +209,10 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord {
$sex = $event->getValue();
if (empty($sex)) $sex = 'U';
echo '<span id="sex" class="';
- if ($event->isOld()) {
+ if ($event->isPendingDeletion()) {
echo 'old ';
}
- if ($event->isNew()) {
+ if ($event->isPendingAddition()) {
echo 'new ';
}
switch ($sex) {
@@ -254,7 +254,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord {
$SHOW_GEDCOM_RECORD = $WT_TREE->getPreference('SHOW_GEDCOM_RECORD');
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}
// edit menu
@@ -344,9 +344,9 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord {
$class = 'person_boxNN';
break;
}
- if ($person->isOld()) {
+ if ($person->isPendingDeletion()) {
$class .= ' old';
- } elseif ($person->isNew()) {
+ } elseif ($person->isPendingAddtion()) {
$class .= ' new';
}
return $class;
diff --git a/library/WT/Controller/Media.php b/library/WT/Controller/Media.php
index 87b6580c53..23390fca9e 100644
--- a/library/WT/Controller/Media.php
+++ b/library/WT/Controller/Media.php
@@ -42,7 +42,7 @@ class WT_Controller_Media extends WT_Controller_GedcomRecord {
$SHOW_GEDCOM_RECORD = $WT_TREE->getPreference('SHOW_GEDCOM_RECORD');
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}
diff --git a/library/WT/Controller/Note.php b/library/WT/Controller/Note.php
index d7ef5dc412..2e4410a7df 100644
--- a/library/WT/Controller/Note.php
+++ b/library/WT/Controller/Note.php
@@ -35,7 +35,7 @@ class WT_Controller_Note extends WT_Controller_GedcomRecord {
* get edit menu
*/
function getEditMenu() {
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}
diff --git a/library/WT/Controller/Repository.php b/library/WT/Controller/Repository.php
index ce42abe45d..9463a52419 100644
--- a/library/WT/Controller/Repository.php
+++ b/library/WT/Controller/Repository.php
@@ -41,7 +41,7 @@ class WT_Controller_Repository extends WT_Controller_GedcomRecord {
$SHOW_GEDCOM_RECORD = $WT_TREE->getPreference('SHOW_GEDCOM_RECORD');
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}
diff --git a/library/WT/Controller/Source.php b/library/WT/Controller/Source.php
index 1d6cc88e98..913d2105db 100644
--- a/library/WT/Controller/Source.php
+++ b/library/WT/Controller/Source.php
@@ -41,7 +41,7 @@ class WT_Controller_Source extends WT_Controller_GedcomRecord {
$SHOW_GEDCOM_RECORD = $WT_TREE->getPreference('SHOW_GEDCOM_RECORD');
- if (!$this->record || $this->record->isOld()) {
+ if (!$this->record || $this->record->isPendingDeletion()) {
return null;
}