gedcom, $matches); foreach ($matches[1] as $match) { $repo = WT_Repository::getInstance($match); if ($repo && !$repo->canShow($access_level)) { return false; } } // ... otherwise apply default behaviour return parent::canShowByType($access_level); } /** {@inheritdoc} */ protected function createPrivateGedcomRecord($access_level) { return '0 @' . $this->xref . "@ SOUR\n1 TITL " . WT_I18N::translate('Private'); } /** {@inheritdoc} */ protected static function fetchGedcomRecord($xref, $gedcom_id) { static $statement = null; if ($statement === null) { $statement = WT_DB::prepare("SELECT s_gedcom FROM `##sources` WHERE s_id=? AND s_file=?"); } return $statement->execute(array($xref, $gedcom_id))->fetchOne(); } /** {@inheritdoc} */ public function extractNames() { parent::_extractNames(1, 'TITL', $this->getFacts('TITL')); } }