summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-10-15 20:57:25 +0000
committerfisharebest <fisharebest@gmail.com>2011-10-15 20:57:25 +0000
commitfabd3e3ec865730a85aac61078e8bf61ec74429c (patch)
treec6ef4437eadc439b360baf510c6f58853184a2e5
parent0366b525190af997ec5f0a7e37f2d5a2e0ccf1a0 (diff)
downloadwebtrees-fabd3e3ec865730a85aac61078e8bf61ec74429c.tar.gz
webtrees-fabd3e3ec865730a85aac61078e8bf61ec74429c.tar.bz2
webtrees-fabd3e3ec865730a85aac61078e8bf61ec74429c.zip
Minor refactoring - move code relating to GEDCOM records into the GEDCOM objects
-rw-r--r--library/WT/Source.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/WT/Source.php b/library/WT/Source.php
index 37fe6e4443..59faa08207 100644
--- a/library/WT/Source.php
+++ b/library/WT/Source.php
@@ -55,10 +55,11 @@ class WT_Source extends WT_GedcomRecord {
if ($statement===null) {
$statement=WT_DB::prepare(
- "SELECT o_type AS type, o_id AS xref, o_file AS ged_id, o_gedcom AS gedrec ".
- "FROM `##other` WHERE o_id=? AND o_file=? AND o_type='REPO'"
+ "SELECT 'SOUR' AS type, s_id AS xref, s_file AS ged_id, s_gedcom AS gedrec ".
+ "FROM `##sources` WHERE s_id=? AND s_file=?"
);
}
+ return $statement->execute(array($xref, $ged_id))->fetchOneRow(PDO::FETCH_ASSOC);
}
public function getAuth() {