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); } // Generate a private version of this record protected function createPrivateGedcomRecord($access_level) { return '0 @' . $this->xref . "@ SOUR\n1 TITL " . WT_I18N::translate('Private'); } // Fetch the record from the database 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(); } // Get an array of structures containing all the names in the record public function getAllNames() { return parent::_getAllNames('TITL', 1); } }