summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-07-05 18:03:01 +0000
committerfisharebest <fisharebest@gmail.com>2013-07-05 18:03:01 +0000
commit4d6804134e9d06c5b5613706aa7d43a629fa2c1a (patch)
treec3a137f3eaad323419b98ef555e67d95ce2f4619
parenta74ae67a836cce479f9ccbdd4716ce648c6b21d2 (diff)
downloadwebtrees-4d6804134e9d06c5b5613706aa7d43a629fa2c1a.tar.gz
webtrees-4d6804134e9d06c5b5613706aa7d43a629fa2c1a.tar.bz2
webtrees-4d6804134e9d06c5b5613706aa7d43a629fa2c1a.zip
More refactoring - getAuth()
-rw-r--r--includes/functions/functions_print_lists.php8
-rw-r--r--library/WT/Source.php4
2 files changed, 7 insertions, 5 deletions
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index 60f895ddbe..771c8898a6 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -977,7 +977,13 @@ function format_sour_table($datalist) {
// Sortable name
$html .= '<td>'. strip_tags($source->getFullName()). '</td>';
//-- Author
- $html .= '<td>'. highlight_search_hits(htmlspecialchars($source->getAuth())). '</td>';
+ $auth = $source->getFactByType('AUTH');
+ if ($auth) {
+ $author = $auth->getValue();
+ } else {
+ $author = '';
+ }
+ $html .= '<td>'. highlight_search_hits($author). '</td>';
//-- Linked INDIs
$num=count($source->fetchLinkedIndividuals());
$html .= '<td>'. WT_I18N::number($num). '</td><td>'. $num. '</td>';
diff --git a/library/WT/Source.php b/library/WT/Source.php
index 67c42c7793..7192618511 100644
--- a/library/WT/Source.php
+++ b/library/WT/Source.php
@@ -64,10 +64,6 @@ class WT_Source extends WT_GedcomRecord {
return $statement->execute(array($xref, $gedcom_id))->fetchOne();
}
- public function getAuth() {
- return get_gedcom_value('AUTH', 1, $this->getGedcom());
- }
-
// Get an array of structures containing all the names in the record
public function getAllNames() {
return parent::_getAllNames('TITL', 1);