-
-
-
-
-
-
-
-
diff --git a/sources/admin_trees_download.php b/sources/admin_trees_download.php
deleted file mode 100644
index c6ec3ed..0000000
--- a/sources/admin_trees_download.php
+++ /dev/null
@@ -1,210 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-use Fisharebest\Webtrees\Functions\FunctionsExport;
-use PclZip;
-
-define('WT_SCRIPT_NAME', 'admin_trees_download.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->setPageTitle(I18N::translate($WT_TREE->getTitleHtml()) . ' — ' . I18N::translate('Export a GEDCOM file'))
- ->restrictAccess(Auth::isManager($WT_TREE));
-
-// Validate user parameters
-$action = Filter::get('action', 'download');
-$convert = Filter::get('convert', 'yes|no', 'no');
-$zip = Filter::get('zip', 'yes|no', 'no');
-$conv_path = Filter::get('conv_path');
-$privatize_export = Filter::get('privatize_export', 'none|visitor|user|gedadmin');
-
-if ($action === 'download') {
- $exportOptions = array(
- 'privatize' => $privatize_export,
- 'toANSI' => $convert,
- 'path' => $conv_path,
- );
-
- // What to call the downloaded file
- $download_filename = $WT_TREE->getName();
- if (strtolower(substr($download_filename, -4, 4)) != '.ged') {
- $download_filename .= '.ged';
- }
-
- if ($zip === 'yes') {
- $temp_dir = WT_DATA_DIR . 'tmp-' . $WT_TREE->getName() . '-' . date('YmdHis') . '/';
- $zip_file = $download_filename . '.zip';
-
- if (!File::mkdir($temp_dir)) {
- echo "Error : Could not create temporary path!";
-
- return;
- }
-
- // Create the unzipped GEDCOM on disk, so we can ZIP it.
- $stream = fopen($temp_dir . $download_filename, "w");
- FunctionsExport::exportGedcom($WT_TREE, $stream, $exportOptions);
- fclose($stream);
-
- // Create a ZIP file containing the GEDCOM file.
- $comment = "Created by " . WT_WEBTREES . " " . WT_VERSION . " on " . date("r") . ".";
- $archive = new PclZip($temp_dir . $zip_file);
- $v_list = $archive->add($temp_dir . $download_filename, \PCLZIP_OPT_COMMENT, $comment, \PCLZIP_OPT_REMOVE_PATH, $temp_dir);
- if ($v_list == 0) {
- echo "Error : " . $archive->errorInfo(true);
- } else {
- header('Content-Type: application/zip');
- header('Content-Disposition: attachment; filename="' . $zip_file . '"');
- header('Content-length: ' . filesize($temp_dir . $zip_file));
- readfile($temp_dir . $zip_file);
- File::delete($temp_dir);
- }
- } else {
- header('Content-Type: text/plain; charset=UTF-8');
- header('Content-Disposition: attachment; filename="' . $download_filename . '"');
- // Stream the GEDCOM file straight to the browser.
- // We could open "php://compress.zlib" to create a .gz file or "php://compress.bzip2" to create a .bz2 file
- $stream = fopen('php://output', 'w');
- FunctionsExport::exportGedcom($WT_TREE, $stream, $exportOptions);
- fclose($stream);
- }
-
- return;
-}
-
-$controller->pageHeader();
-
-?>
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-
-
-
-
-
-
-
diff --git a/sources/admin_trees_duplicates.php b/sources/admin_trees_duplicates.php
deleted file mode 100644
index 8af391a..0000000
--- a/sources/admin_trees_duplicates.php
+++ /dev/null
@@ -1,184 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-
-define('WT_SCRIPT_NAME', 'admin_trees_duplicates.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate('Find duplicates') . ' — ' . $WT_TREE->getTitleHtml())
- ->pageHeader();
-
-$repositories = Database::prepare(
- "SELECT GROUP_CONCAT(n_id) AS xrefs " .
- " FROM `##other`" .
- " JOIN `##name` ON o_id = n_id AND o_file = n_file" .
- " WHERE o_file = :tree_id AND o_type = 'REPO'" .
- " GROUP BY n_full" .
- " HAVING COUNT(n_id) > 1"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-
-$repositories = array_map(
- function (\stdClass $x) use ($WT_TREE) {
- $tmp = explode(',', $x->xrefs);
-
- return array_map(function ($y) use ($WT_TREE) {
- return Repository::getInstance($y, $WT_TREE);
- }, $tmp);
- }, $repositories
-);
-
-$sources = Database::prepare(
- "SELECT GROUP_CONCAT(n_id) AS xrefs " .
- " FROM `##sources`" .
- " JOIN `##name` ON s_id = n_id AND s_file = n_file" .
- " WHERE s_file = :tree_id" .
- " GROUP BY n_full" .
- " HAVING COUNT(n_id) > 1"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-
-$sources = array_map(
- function (\stdClass $x) use ($WT_TREE) {
- $tmp = explode(',', $x->xrefs);
-
- return array_map(function ($y) use ($WT_TREE) {
- return Source::getInstance($y, $WT_TREE);
- }, $tmp);
- }, $sources
-);
-
-$individuals = Database::prepare(
- "SELECT DISTINCT GROUP_CONCAT(d_gid ORDER BY d_gid) AS xrefs" .
- " FROM `##dates` AS d" .
- " JOIN `##name` ON d_file = n_file AND d_gid = n_id" .
- " WHERE d_file = :tree_id AND d_fact IN ('BIRT', 'CHR', 'BAPM', 'DEAT', 'BURI')" .
- " GROUP BY d_day, d_month, d_year, d_type, d_fact, n_type, n_full" .
- " HAVING COUNT(DISTINCT d_gid) > 1"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-
-$individuals = array_map(
- function (\stdClass $x) use ($WT_TREE) {
- $tmp = explode(',', $x->xrefs);
-
- return array_map(function ($y) use ($WT_TREE) {
- return Individual::getInstance($y, $WT_TREE);
- }, $tmp);
- }, $individuals
-);
-
-$families = Database::prepare(
- "SELECT GROUP_CONCAT(f_id) AS xrefs " .
- " FROM `##families`" .
- " WHERE f_file = :tree_id" .
- " GROUP BY LEAST(f_husb, f_wife), GREATEST(f_husb, f_wife)" .
- " HAVING COUNT(f_id) > 1"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-
-$families = array_map(
- function (\stdClass $x) use ($WT_TREE) {
- $tmp = explode(',', $x->xrefs);
-
- return array_map(function ($y) use ($WT_TREE) {
- return Family::getInstance($y, $WT_TREE);
- }, $tmp);
- }, $families
-);
-
-$media = Database::prepare(
- "SELECT GROUP_CONCAT(m_id) AS xrefs " .
- " FROM `##media`" .
- " WHERE m_file = :tree_id" .
- " GROUP BY m_titl" .
- " HAVING COUNT(m_id) > 1"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-
-$media = array_map(
- function (\stdClass $x) use ($WT_TREE) {
- $tmp = explode(',', $x->xrefs);
-
- return array_map(function ($y) use ($WT_TREE) {
- return Media::getInstance($y, $WT_TREE);
- }, $tmp);
- }, $media
-);
-
-$all_duplicates = array(
- I18N::translate('Repositories') => $repositories,
- I18N::translate('Sources') => $sources,
- I18N::translate('Individuals') => $individuals,
- I18N::translate('Families') => $families,
- I18N::translate('Media objects') => $media,
-);
-
-?>
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
- $duplicate_list): ?>
-
-
-
-
-
-
-
-
-
-
diff --git a/sources/admin_trees_export.php b/sources/admin_trees_export.php
deleted file mode 100644
index 833eed8..0000000
--- a/sources/admin_trees_export.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-define('WT_SCRIPT_NAME', 'admin_trees_export.php');
-require './includes/session.php';
-
-if (Auth::isManager($WT_TREE) && Filter::checkCsrf()) {
- $filename = WT_DATA_DIR . $WT_TREE->getName();
- // Force a ".ged" suffix
- if (strtolower(substr($filename, -4)) != '.ged') {
- $filename .= '.ged';
- }
-
- try {
- // To avoid partial trees on timeout/diskspace/etc, write to a temporary file first
- $stream = fopen($filename . '.tmp', 'w');
- $WT_TREE->exportGedcom($stream);
- fclose($stream);
- rename($filename . '.tmp', $filename);
- FlashMessages::addMessage(/* I18N: %s is a filename */ I18N::translate('The family tree has been exported to %s.', Html::filename($filename)), 'success');
- } catch (\ErrorException $ex) {
- FlashMessages::addMessage(
- I18N::translate('The file %s could not be created.', Html::filename($filename)) . '
' . $ex->getMessage() . ' ',
- 'danger'
- );
- }
-}
-
-header('Location: ' . WT_BASE_URL . 'admin_trees_manage.php');
diff --git a/sources/admin_trees_manage.php b/sources/admin_trees_manage.php
deleted file mode 100644
index cfac505..0000000
--- a/sources/admin_trees_manage.php
+++ /dev/null
@@ -1,774 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-use Fisharebest\Webtrees\Functions\Functions;
-
-define('WT_SCRIPT_NAME', 'admin_trees_manage.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->addExternalJavascript(WT_ADMIN_JS_URL)
- ->restrictAccess(Auth::isAdmin() || Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate('Manage family trees'));
-
-// Show a reduced page when there are more than a certain number of trees
-$multiple_tree_threshold = Site::getPreference('MULTIPLE_TREE_THRESHOLD') ?: 500;
-
-// Note that glob() returns false instead of an empty array when open_basedir_restriction
-// is in force and no files are found. See PHP bug #47358.
-if (defined('GLOB_BRACE')) {
- $gedcom_files = glob(WT_DATA_DIR . '*.{ged,Ged,GED}', GLOB_NOSORT | GLOB_BRACE) ?: array();
-} else {
- $gedcom_files = array_merge(
- glob(WT_DATA_DIR . '*.ged', GLOB_NOSORT) ?: array(),
- glob(WT_DATA_DIR . '*.Ged', GLOB_NOSORT) ?: array(),
- glob(WT_DATA_DIR . '*.GED', GLOB_NOSORT) ?: array()
- );
-}
-// Process POST actions
-switch (Filter::post('action')) {
-case 'delete':
- $gedcom_id = Filter::postInteger('gedcom_id');
- if (Filter::checkCsrf() && $gedcom_id) {
- $tree = Tree::findById($gedcom_id);
- FlashMessages::addMessage(/* I18N: %s is the name of a family tree */ I18N::translate('The family tree “%s” has been deleted.', $tree->getTitleHtml()), 'success');
- $tree->delete();
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-case 'setdefault':
- if (Filter::checkCsrf()) {
- Site::setPreference('DEFAULT_GEDCOM', Filter::post('ged'));
- FlashMessages::addMessage(/* I18N: %s is the name of a family tree */ I18N::translate('The family tree “%s” will be shown to visitors when they first arrive at this website.', $WT_TREE->getTitleHtml()), 'success');
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-case 'new_tree':
- $basename = basename(Filter::post('tree_name'));
- $tree_title = Filter::post('tree_title');
-
- if (Filter::checkCsrf() && $basename && $tree_title) {
- if (Tree::findByName($basename)) {
- FlashMessages::addMessage(/* I18N: %s is the name of a family tree */ I18N::translate('The family tree “%s” already exists.', Filter::escapeHtml($basename)), 'danger');
- } else {
- Tree::create($basename, $tree_title);
- FlashMessages::addMessage(/* I18N: %s is the name of a family tree */ I18N::translate('The family tree “%s” has been created.', Filter::escapeHtml($basename)), 'success');
- }
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?ged=' . Filter::escapeUrl($basename));
-
- return;
-case 'replace_upload':
- $gedcom_id = Filter::postInteger('gedcom_id');
- $keep_media = Filter::post('keep_media', '1', '0');
- $GEDCOM_MEDIA_PATH = Filter::post('GEDCOM_MEDIA_PATH');
- $WORD_WRAPPED_NOTES = Filter::post('WORD_WRAPPED_NOTES', '1', '0');
- $tree = Tree::findById($gedcom_id);
-
- if (Filter::checkCsrf() && $tree) {
- $tree->setPreference('keep_media', $keep_media);
- $tree->setPreference('GEDCOM_MEDIA_PATH', $GEDCOM_MEDIA_PATH);
- $tree->setPreference('WORD_WRAPPED_NOTES', $WORD_WRAPPED_NOTES);
- if (isset($_FILES['tree_name'])) {
- if ($_FILES['tree_name']['error'] == 0 && is_readable($_FILES['tree_name']['tmp_name'])) {
- $tree->importGedcomFile($_FILES['tree_name']['tmp_name'], $_FILES['tree_name']['name']);
- } else {
- FlashMessages::addMessage(Functions::fileUploadErrorText($_FILES['tree_name']['error']), 'danger');
- }
- } else {
- FlashMessages::addMessage(I18N::translate('No GEDCOM file was received.'), 'danger');
- }
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-case 'replace_import':
- $basename = basename(Filter::post('tree_name'));
- $gedcom_id = Filter::postInteger('gedcom_id');
- $keep_media = Filter::post('keep_media', '1', '0');
- $GEDCOM_MEDIA_PATH = Filter::post('GEDCOM_MEDIA_PATH');
- $WORD_WRAPPED_NOTES = Filter::post('WORD_WRAPPED_NOTES', '1', '0');
- $tree = Tree::findById($gedcom_id);
-
- if (Filter::checkCsrf() && $tree) {
- $tree->setPreference('keep_media', $keep_media);
- $tree->setPreference('GEDCOM_MEDIA_PATH', $GEDCOM_MEDIA_PATH);
- $tree->setPreference('WORD_WRAPPED_NOTES', $WORD_WRAPPED_NOTES);
- if ($basename) {
- $tree->importGedcomFile(WT_DATA_DIR . $basename, $basename);
- } else {
- FlashMessages::addMessage(I18N::translate('No GEDCOM file was received.'), 'danger');
- }
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-
-case 'synchronize':
- if (Filter::checkCsrf()) {
- $basenames = array();
-
- foreach ($gedcom_files as $gedcom_file) {
- $filemtime = filemtime($gedcom_file); // Only import files that have changed
- $basename = basename($gedcom_file);
- $basenames[] = $basename;
-
- $tree = Tree::findByName($basename);
- if (!$tree) {
- $tree = Tree::create($basename, $basename);
- }
- if ($tree->getPreference('filemtime') != $filemtime) {
- $tree->importGedcomFile($gedcom_file, $basename);
- $tree->setPreference('filemtime', $filemtime);
- FlashMessages::addMessage(I18N::translate('The GEDCOM file “%s” has been imported.', Filter::escapeHtml($basename)), 'success');
- }
- }
-
- foreach (Tree::getAll() as $tree) {
- if (!in_array($tree->getName(), $basenames)) {
- FlashMessages::addMessage(I18N::translate('The family tree “%s” has been deleted.', $tree->getTitleHtml()), 'success');
- $tree->delete();
- }
- }
-
- }
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-}
-
-$default_tree_title = /* I18N: Default name for a new tree */ I18N::translate('My family tree');
-$default_tree_name = 'tree';
-$default_tree_number = 1;
-$existing_trees = Tree::getNameList();
-while (array_key_exists($default_tree_name . $default_tree_number, $existing_trees)) {
- $default_tree_number++;
-}
-$default_tree_name .= $default_tree_number;
-
-// Process GET actions
-switch (Filter::get('action')) {
-case 'importform':
- $controller
- ->setPageTitle($WT_TREE->getTitleHtml() . ' — ' . I18N::translate('Import a GEDCOM file'))
- ->pageHeader();
-
- ?>
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
- getPreference('gedcom_filename')
- ?>
-
- getTitleHtml()); ?>
-
-
- pageHeader();
-
-$all_trees = Tree::getAll();
-// On sites with hundreds or thousands of trees, this page becomes very large.
-// Just show the current tree, the default tree, and unimported trees
-if (count($all_trees) >= $multiple_tree_threshold) {
- $all_trees = array_filter($all_trees, function (Tree $x) use ($WT_TREE) {
- return $x->getPreference('imported') === '0' || $WT_TREE->getTreeId() === $x->getTreeId() || $x->getName() === Site::getPreference('DEFAULT_GEDCOM');
- });
-}
-
-// List the gedcoms available to this user
-?>
-
-
-
-
-
-
getPageTitle(); ?>
-
-
-
-
-
-
-
-
- execute(array($tree->getTreeId()))->fetchOne();
- if ($importing) {
- ?>
-
- addInlineJavascript(
- 'jQuery("#import' . $tree->getTreeId() . '").load("import.php?gedcom_id=' . $tree->getTreeId() . '");'
- );
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Important note: The transfer wizard is not able to assist with moving media items. You will need to set up and move or copy your media configuration and objects separately after the transfer wizard is finished.'); ?>
-
-
-
-
-
-
-
-
-
-
-
-
- = $multiple_tree_threshold): ?>
-
-
-
diff --git a/sources/admin_trees_merge.php b/sources/admin_trees_merge.php
deleted file mode 100644
index fbef3c7..0000000
--- a/sources/admin_trees_merge.php
+++ /dev/null
@@ -1,205 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-use Fisharebest\Webtrees\Functions\FunctionsEdit;
-
-define('WT_SCRIPT_NAME', 'admin_trees_merge.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate('Merge family trees'))
- ->pageHeader();
-
-?>
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-execute(array(
- $tree1_id, $tree1_id, $tree1_id, $tree1_id, $tree1_id,
- $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id,
- ))->fetchAssoc();
-
- if ($xrefs) {
- $tree1 = Tree::findById($tree1_id);
- $tree2 = Tree::findById($tree2_id);
- echo
- '
', I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.'), '
',
- '
',
- I18N::plural(
- /* I18N: An XREF is the identification number used in GEDCOM files. */
- 'The two family trees have %1$s record which uses the same “XREF”.',
- 'The two family trees have %1$s records which use the same “XREF”.',
- count($xrefs), count($xrefs)
- ),
- '
',
- '
',
- I18N::translate('You must renumber the records in one of the trees before you can merge them.'),
- '
',
- '
',
- '',
- I18N::translate('Renumber family tree'), ' — ', $tree1->getTitleHtml(),
- ' ',
- '
',
- '
',
- '',
- I18N::translate('Renumber family tree'), ' — ', $tree2->getTitleHtml(),
- ' ',
- '
';
- } else {
- Database::beginTransaction();
- Database::exec(
- "LOCK TABLE" .
- " `##individuals` WRITE," .
- " `##individuals` AS individuals2 READ," .
- " `##families` WRITE," .
- " `##families` AS families2 READ," .
- " `##sources` WRITE," .
- " `##sources` AS sources2 READ," .
- " `##media` WRITE," .
- " `##media` AS media2 READ," .
- " `##other` WRITE," .
- " `##other` AS other2 READ," .
- " `##name` WRITE," .
- " `##name` AS name2 READ," .
- " `##placelinks` WRITE," .
- " `##placelinks` AS placelinks2 READ," .
- " `##change` WRITE," .
- " `##change` AS change2 READ," .
- " `##dates` WRITE," .
- " `##dates` AS dates2 READ," .
- " `##default_resn` WRITE," .
- " `##default_resn` AS default_resn2 READ," .
- " `##hit_counter` WRITE," .
- " `##hit_counter` AS hit_counter2 READ," .
- " `##link` WRITE," .
- " `##link` AS link2 READ"
- );
- Database::prepare(
- "INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom)" .
- " SELECT i_id, ?, i_rin, i_sex, i_gedcom FROM `##individuals` AS individuals2 WHERE i_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil)" .
- " SELECT f_id, ?, f_husb, f_wife, f_gedcom, f_numchil FROM `##families` AS families2 WHERE f_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom)" .
- " SELECT s_id, ?, s_name, s_gedcom FROM `##sources` AS sources2 WHERE s_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom)" .
- " SELECT m_id, m_ext, m_type, m_titl, m_filename, ?, m_gedcom FROM `##media` AS media2 WHERE m_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom)" .
- " SELECT o_id, ?, o_type, o_gedcom FROM `##other` AS other2 WHERE o_file = ? AND o_type NOT IN ('HEAD', 'TRLR')"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##name` (n_file, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm)" .
- " SELECT ?, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm FROM `##name` AS name2 WHERE n_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##placelinks` (pl_p_id, pl_gid, pl_file)" .
- " SELECT pl_p_id, pl_gid, ? FROM `##placelinks` AS placelinks2 WHERE pl_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##dates` (d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, d_file, d_type)" .
- " SELECT d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, ?, d_type FROM `##dates` AS dates2 WHERE d_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn)" .
- " SELECT ?, xref, tag_type, resn FROM `##default_resn` AS default_resn2 WHERE gedcom_id = ?"
- )->execute(array($tree2_id, $tree1_id));
- Database::prepare(
- "INSERT INTO `##link` (l_file, l_from, l_type, l_to)" .
- " SELECT ?, l_from, l_type, l_to FROM `##link` AS link2 WHERE l_file = ?"
- )->execute(array($tree2_id, $tree1_id));
- // This table may contain old (deleted) references, which could clash. IGNORE these.
- Database::prepare(
- "INSERT IGNORE INTO `##change` (change_time, status, gedcom_id, xref, old_gedcom, new_gedcom, user_id)" .
- " SELECT change_time, status, ?, xref, old_gedcom, new_gedcom, user_id FROM `##change` AS change2 WHERE gedcom_id = ?"
- )->execute(array($tree2_id, $tree1_id));
- // This table may contain old (deleted) references, which could clash. IGNORE these.
- Database::prepare(
- "INSERT IGNORE INTO `##hit_counter` (gedcom_id, page_name, page_parameter, page_count)" .
- " SELECT ?, page_name, page_parameter, page_count FROM `##hit_counter` AS hit_counter2 WHERE gedcom_id = ? AND page_name <> 'index.php'"
- )->execute(array($tree2_id, $tree1_id));
- Database::exec("UNLOCK TABLES");
- Database::commit();
- echo '
', I18N::translate('The family trees have been merged successfully.'), '
';
- }
-} else {
- echo '
';
-}
diff --git a/sources/admin_trees_places.php b/sources/admin_trees_places.php
deleted file mode 100644
index 9c469b5..0000000
--- a/sources/admin_trees_places.php
+++ /dev/null
@@ -1,132 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-
-define('WT_SCRIPT_NAME', 'admin_trees_places.php');
-require './includes/session.php';
-
-$search = Filter::post('search', null, Filter::get('search'));
-$replace = Filter::post('replace');
-$confirm = Filter::post('confirm');
-
-$changes = array();
-
-if ($search && $replace) {
- $rows = Database::prepare(
- "SELECT i_id AS xref, i_gedcom AS gedcom" .
- " FROM `##individuals`" .
- " LEFT JOIN `##change` ON (i_id = xref AND i_file=gedcom_id AND status='pending')" .
- " WHERE i_file = ?" .
- " AND COALESCE(new_gedcom, i_gedcom) REGEXP CONCAT('\n2 PLAC ([^\n]*, )*', ?, '(\n|$)')"
- )->execute(array($WT_TREE->getTreeId(), preg_quote($search)))->fetchAll();
- foreach ($rows as $row) {
- $record = Individual::getInstance($row->xref, $WT_TREE, $row->gedcom);
- foreach ($record->getFacts() as $fact) {
- $old_place = $fact->getAttribute('PLAC');
- if (preg_match('/(^|, )' . preg_quote($search, '/') . '$/i', $old_place)) {
- $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
- $changes[$old_place] = $new_place;
- if ($confirm == 'update') {
- $gedcom = preg_replace('/(\n2 PLAC (?:.*, )*)' . preg_quote($search, '/') . '(\n|$)/i', '$1' . $replace . '$2', $fact->getGedcom());
- $record->updateFact($fact->getFactId(), $gedcom, false);
- }
- }
- }
- }
- $rows = Database::prepare(
- "SELECT f_id AS xref, f_gedcom AS gedcom" .
- " FROM `##families`" .
- " LEFT JOIN `##change` ON (f_id = xref AND f_file=gedcom_id AND status='pending')" .
- " WHERE f_file = ?" .
- " AND COALESCE(new_gedcom, f_gedcom) REGEXP CONCAT('\n2 PLAC ([^\n]*, )*', ?, '(\n|$)')"
- )->execute(array($WT_TREE->getTreeId(), preg_quote($search)))->fetchAll();
- foreach ($rows as $row) {
- $record = Family::getInstance($row->xref, $WT_TREE, $row->gedcom);
- foreach ($record->getFacts() as $fact) {
- $old_place = $fact->getAttribute('PLAC');
- if (preg_match('/(^|, )' . preg_quote($search, '/') . '$/i', $old_place)) {
- $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
- $changes[$old_place] = $new_place;
- if ($confirm == 'update') {
- $gedcom = preg_replace('/(\n2 PLAC (?:.*, )*)' . preg_quote($search, '/') . '(\n|$)/i', '$1' . $replace . '$2', $fact->getGedcom());
- $record->updateFact($fact->getFactId(), $gedcom, false);
- }
- }
- }
- }
-}
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate('Update all the place names in a family tree') . ' — ' . $WT_TREE->getTitleHtml())
- ->addInlineJavascript('autocomplete();')
- ->pageHeader();
-?>
-
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- $new_place) { ?>
-
-
- →
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sources/admin_trees_renumber.php b/sources/admin_trees_renumber.php
deleted file mode 100644
index 4fcfc9e..0000000
--- a/sources/admin_trees_renumber.php
+++ /dev/null
@@ -1,287 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\PageController;
-
-define('WT_SCRIPT_NAME', 'admin_trees_renumber.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate(/* I18N: Renumber the records in a family tree */ 'Renumber family tree') . ' — ' . $WT_TREE->getTitleHtml())
- ->pageHeader();
-
-// Every XREF used by this tree and also used by some other tree
-$xrefs = Database::prepare(
- "SELECT xref, type FROM (" .
- " SELECT i_id AS xref, 'INDI' AS type FROM `##individuals` WHERE i_file = ?" .
- " UNION " .
- " SELECT f_id AS xref, 'FAM' AS type FROM `##families` WHERE f_file = ?" .
- " UNION " .
- " SELECT s_id AS xref, 'SOUR' AS type FROM `##sources` WHERE s_file = ?" .
- " UNION " .
- " SELECT m_id AS xref, 'OBJE' AS type FROM `##media` WHERE m_file = ?" .
- " UNION " .
- " SELECT o_id AS xref, o_type AS type FROM `##other` WHERE o_file = ? AND o_type NOT IN ('HEAD', 'TRLR')" .
- ") AS this_tree JOIN (" .
- " SELECT xref FROM `##change` WHERE gedcom_id <> ?" .
- " UNION " .
- " SELECT i_id AS xref FROM `##individuals` WHERE i_file <> ?" .
- " UNION " .
- " SELECT f_id AS xref FROM `##families` WHERE f_file <> ?" .
- " UNION " .
- " SELECT s_id AS xref FROM `##sources` WHERE s_file <> ?" .
- " UNION " .
- " SELECT m_id AS xref FROM `##media` WHERE m_file <> ?" .
- " UNION " .
- " SELECT o_id AS xref FROM `##other` WHERE o_file <> ? AND o_type NOT IN ('HEAD', 'TRLR')" .
- ") AS other_trees USING (xref)"
-)->execute(array(
- $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(),
- $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(),
-))->fetchAssoc();
-
-echo '
', $controller->getPageTitle(), ' ';
-
-if (Filter::get('action') === 'renumber') {
- foreach ($xrefs as $old_xref => $type) {
- Database::beginTransaction();
- Database::exec(
- "LOCK TABLE `##individuals` WRITE," .
- " `##families` WRITE," .
- " `##sources` WRITE," .
- " `##media` WRITE," .
- " `##other` WRITE," .
- " `##name` WRITE," .
- " `##placelinks` WRITE," .
- " `##change` WRITE," .
- " `##next_id` WRITE," .
- " `##dates` WRITE," .
- " `##default_resn` WRITE," .
- " `##hit_counter` WRITE," .
- " `##link` WRITE," .
- " `##user_gedcom_setting` WRITE"
- );
- $new_xref = $WT_TREE->getNewXref($type);
- switch ($type) {
- case 'INDI':
- Database::prepare(
- "UPDATE `##individuals` SET i_id = ?, i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_id = ? AND i_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ INDI\n", "0 @$new_xref@ INDI\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'HUSB') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " HUSB @$old_xref@", " HUSB @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'WIFE') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " WIFE @$old_xref@", " WIFE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'CHIL') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " CHIL @$old_xref@", " CHIL @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'ASSO') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " ASSO @$old_xref@", " ASSO @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = '_ASSO') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " _ASSO @$old_xref@", " _ASSO @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'ASSO') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " ASSO @$old_xref@", " ASSO @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = '_ASSO') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " _ASSO @$old_xref@", " _ASSO @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##placelinks` SET pl_gid = ? WHERE pl_gid = ? AND pl_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##dates` SET d_gid = ? WHERE d_gid = ? AND d_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##user_gedcom_setting` SET setting_value = ? WHERE setting_value = ? AND gedcom_id = ? AND setting_name IN ('gedcomid', 'rootid')"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- break;
- case 'FAM':
- Database::prepare(
- "UPDATE `##families` SET f_id = ?, f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_id = ? AND f_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ FAM\n", "0 @$new_xref@ FAM\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'FAMC') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " FAMC @$old_xref@", " FAMC @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'FAMS') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " FAMS @$old_xref@", " FAMS @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##placelinks` SET pl_gid = ? WHERE pl_gid = ? AND pl_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##dates` SET d_gid = ? WHERE d_gid = ? AND d_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- break;
- case 'SOUR':
- Database::prepare(
- "UPDATE `##sources` SET s_id = ?, s_gedcom = REPLACE(s_gedcom, ?, ?) WHERE s_id = ? AND s_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ SOUR\n", "0 @$new_xref@ SOUR\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'SOUR') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " SOUR @$old_xref@", " SOUR @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'SOUR') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " SOUR @$old_xref@", " SOUR @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##media` JOIN `##link` ON (l_file = m_file AND l_to = ? AND l_type = 'SOUR') SET m_gedcom = REPLACE(m_gedcom, ?, ?) WHERE m_file = ?"
- )->execute(array($old_xref, " SOUR @$old_xref@", " SOUR @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##other` JOIN `##link` ON (l_file = o_file AND l_to = ? AND l_type = 'SOUR') SET o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_file = ?"
- )->execute(array($old_xref, " SOUR @$old_xref@", " SOUR @$new_xref@", $WT_TREE->getTreeId()));
- break;
- case 'REPO':
- Database::prepare(
- "UPDATE `##other` SET o_id = ?, o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_id = ? AND o_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ REPO\n", "0 @$new_xref@ REPO\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##sources` JOIN `##link` ON (l_file = s_file AND l_to = ? AND l_type = 'REPO') SET s_gedcom = REPLACE(s_gedcom, ?, ?) WHERE s_file = ?"
- )->execute(array($old_xref, " REPO @$old_xref@", " REPO @$new_xref@", $WT_TREE->getTreeId()));
- break;
- case 'NOTE':
- Database::prepare(
- "UPDATE `##other` SET o_id = ?, o_gedcom = REPLACE(REPLACE(o_gedcom, ?, ?), ?, ?) WHERE o_id = ? AND o_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ NOTE\n", "0 @$new_xref@ NOTE\n", "0 @$old_xref@ NOTE ", "0 @$new_xref@ NOTE ", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'NOTE') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " NOTE @$old_xref@", " NOTE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'NOTE') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " NOTE @$old_xref@", " NOTE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##media` JOIN `##link` ON (l_file = m_file AND l_to = ? AND l_type = 'NOTE') SET m_gedcom = REPLACE(m_gedcom, ?, ?) WHERE m_file = ?"
- )->execute(array($old_xref, " NOTE @$old_xref@", " NOTE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##sources` JOIN `##link` ON (l_file = s_file AND l_to = ? AND l_type = 'NOTE') SET s_gedcom = REPLACE(s_gedcom, ?, ?) WHERE s_file = ?"
- )->execute(array($old_xref, " NOTE @$old_xref@", " NOTE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##other` JOIN `##link` ON (l_file = o_file AND l_to = ? AND l_type = 'NOTE') SET o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_file = ?"
- )->execute(array($old_xref, " NOTE @$old_xref@", " NOTE @$new_xref@", $WT_TREE->getTreeId()));
- break;
- case 'OBJE':
- Database::prepare(
- "UPDATE `##media` SET m_id = ?, m_gedcom = REPLACE(m_gedcom, ?, ?) WHERE m_id = ? AND m_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ OBJE\n", "0 @$new_xref@ OBJE\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'OBJE') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " OBJE @$old_xref@", " OBJE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'OBJE') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " OBJE @$old_xref@", " OBJE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##media` JOIN `##link` ON (l_file = m_file AND l_to = ? AND l_type = 'OBJE') SET m_gedcom = REPLACE(m_gedcom, ?, ?) WHERE m_file = ?"
- )->execute(array($old_xref, " OBJE @$old_xref@", " OBJE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##sources` JOIN `##link` ON (l_file = s_file AND l_to = ? AND l_type = 'OBJE') SET s_gedcom = REPLACE(s_gedcom, ?, ?) WHERE s_file = ?"
- )->execute(array($old_xref, " OBJE @$old_xref@", " OBJE @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##other` JOIN `##link` ON (l_file = o_file AND l_to = ? AND l_type = 'OBJE') SET o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_file = ?"
- )->execute(array($old_xref, " OBJE @$old_xref@", " OBJE @$new_xref@", $WT_TREE->getTreeId()));
- break;
- default:
- Database::prepare(
- "UPDATE `##other` SET o_id = ?, o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_id = ? AND o_file = ?"
- )->execute(array($new_xref, "0 @$old_xref@ $type\n", "0 @$new_xref@ $type\n", $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ?) SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?"
- )->execute(array($old_xref, " @$old_xref@", " @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ?) SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?"
- )->execute(array($old_xref, " @$old_xref@", " @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##media` JOIN `##link` ON (l_file = m_file AND l_to = ?) SET m_gedcom = REPLACE(m_gedcom, ?, ?) WHERE m_file = ?"
- )->execute(array($old_xref, " @$old_xref@", " @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##sources` JOIN `##link` ON (l_file = s_file AND l_to = ?) SET s_gedcom = REPLACE(s_gedcom, ?, ?) WHERE s_file = ?"
- )->execute(array($old_xref, " @$old_xref@", " @$new_xref@", $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##other` JOIN `##link` ON (l_file = o_file AND l_to = ?) SET o_gedcom = REPLACE(o_gedcom, ?, ?) WHERE o_file = ?"
- )->execute(array($old_xref, " @$old_xref@", " @$new_xref@", $WT_TREE->getTreeId()));
- break;
- }
- Database::prepare(
- "UPDATE `##name` SET n_id = ? WHERE n_id = ? AND n_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##default_resn` SET xref = ? WHERE xref = ? AND gedcom_id = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##hit_counter` SET page_parameter = ? WHERE page_parameter = ? AND gedcom_id = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##link` SET l_from = ? WHERE l_from = ? AND l_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- Database::prepare(
- "UPDATE `##link` SET l_to = ? WHERE l_to = ? AND l_file = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- echo '
', I18N::translate('The record %1$s has been renamed to %2$s.', $old_xref, $new_xref), '
';
- unset($xrefs[$old_xref]);
- Database::exec("UNLOCK TABLES");
- Database::commit();
-
- try {
- Database::prepare(
- "UPDATE `##favorite` SET xref = ? WHERE xref = ? AND gedcom_id = ?"
- )->execute(array($new_xref, $old_xref, $WT_TREE->getTreeId()));
- } catch (\Exception $ex) {
- // Perhaps the favorites module was not installed?
- }
-
- // How much time do we have left?
- if (microtime(true) - WT_START_TIME > ini_get('max_execution_time') - 2) {
- echo '
', I18N::translate('The server’s time limit has been reached.'), '
';
- break;
- }
- }
- if ($xrefs) {
-
- }
-} else {
- echo '
', I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.'), '
';
- echo '
', I18N::translate('You can renumber the records in a family tree, so that these internal reference numbers are not duplicated in any other family tree.'), '
';
-}
-
-echo '
', I18N::plural(
- 'This family tree has %s record which uses the same “XREF” as another family tree.',
- 'This family tree has %s records which use the same “XREF” as another family tree.',
- count($xrefs), count($xrefs)
-), '
';
-
-if ($xrefs) {
- // We use GET (not POST) for this update operation - because we want the user to
- // be able to press F5 to continue after a timeout.
- echo '
';
- echo '
', I18N::translate('Caution! This may take a long time. Be patient.'), '
';
-}
diff --git a/sources/admin_trees_unconnected.php b/sources/admin_trees_unconnected.php
deleted file mode 100644
index b00195b..0000000
--- a/sources/admin_trees_unconnected.php
+++ /dev/null
@@ -1,91 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Algorithm\ConnectedComponent;
-use Fisharebest\Webtrees\Controller\PageController;
-
-define('WT_SCRIPT_NAME', 'admin_trees_unconnected.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isManager($WT_TREE))
- ->setPageTitle(I18N::translate('Find unrelated individuals') . ' — ' . $WT_TREE->getTitleHtml())
- ->pageHeader();
-
-$rows = Database::prepare(
- "SELECT l_from, l_to FROM `##link` WHERE l_file = :tree_id AND l_type IN ('FAMS', 'FAMC')"
-)->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
-))->fetchAll();
-$graph = array();
-
-foreach ($rows as $row) {
- $graph[$row->l_from][$row->l_to] = 1;
- $graph[$row->l_to][$row->l_from] = 1;
-}
-
-$algorithm = new ConnectedComponent($graph);
-$components = $algorithm->findConnectedComponents();
-$root = $controller->getSignificantIndividual();
-$root_id = $root->getXref();
-
-/** @var Individual[][] */
-$individual_groups = array();
-$group_number = 1;
-
-foreach ($components as $key => $component) {
- if (!in_array($root_id, $component)) {
- $individuals = array();
- foreach ($component as $xref) {
- $individual = Individual::getInstance($xref, $WT_TREE);
- if ($individual instanceof Individual) {
- $individuals[] = $individual;
- }
- }
- $individual_groups[$group_number++] = $individuals;
- }
-}
-
-?>
-
-
-
-getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-
getFullName()) ?>
-
-
-
-
-
diff --git a/sources/admin_users.php b/sources/admin_users.php
deleted file mode 100644
index 00c7154..0000000
--- a/sources/admin_users.php
+++ /dev/null
@@ -1,862 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-use Fisharebest\Webtrees\Controller\PageController;
-use Fisharebest\Webtrees\Functions\FunctionsDate;
-use Fisharebest\Webtrees\Functions\FunctionsEdit;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use PDO;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-define('WT_SCRIPT_NAME', 'admin_users.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller->restrictAccess(Auth::isAdmin());
-
-// Valid values for form variables
-$ALL_EDIT_OPTIONS = array(
- 'none' => /* I18N: Listbox entry; name of a role */ I18N::translate('Visitor'),
- 'access' => /* I18N: Listbox entry; name of a role */ I18N::translate('Member'),
- 'edit' => /* I18N: Listbox entry; name of a role */ I18N::translate('Editor'),
- 'accept' => /* I18N: Listbox entry; name of a role */ I18N::translate('Moderator'),
- 'admin' => /* I18N: Listbox entry; name of a role */ I18N::translate('Manager'),
-);
-
-// Form actions
-switch (Filter::post('action')) {
-case 'save':
- if (Filter::checkCsrf()) {
- $user_id = Filter::postInteger('user_id');
- $user = User::find($user_id);
- $username = Filter::post('username');
- $real_name = Filter::post('real_name');
- $email = Filter::postEmail('email');
- $pass1 = Filter::post('pass1', WT_REGEX_PASSWORD);
- $pass2 = Filter::post('pass2', WT_REGEX_PASSWORD);
- $theme = Filter::post('theme', implode('|', array_keys(Theme::themeNames())), '');
- $language = Filter::post('language');
- $timezone = Filter::post('timezone');
- $contact_method = Filter::post('contact_method');
- $comment = Filter::post('comment');
- $auto_accept = Filter::postBool('auto_accept');
- $canadmin = Filter::postBool('canadmin');
- $visible_online = Filter::postBool('visible_online');
- $verified = Filter::postBool('verified');
- $approved = Filter::postBool('approved');
-
- if ($user_id === 0) {
- // Create a new user
- if (User::findByUserName($username)) {
- FlashMessages::addMessage(I18N::translate('Duplicate username. A user with that username already exists. Please choose another username.'));
- } elseif (User::findByEmail($email)) {
- FlashMessages::addMessage(I18N::translate('Duplicate email address. A user with that email already exists.'));
- } elseif ($pass1 !== $pass2) {
- FlashMessages::addMessage(I18N::translate('The passwords do not match.'));
- } else {
- $user = User::create($username, $real_name, $email, $pass1);
- $user->setPreference('reg_timestamp', date('U'))->setPreference('sessiontime', '0');
- Log::addAuthenticationLog('User ->' . $username . '<- created');
- }
- } else {
- $user = User::find($user_id);
- if ($user && $username && $real_name) {
- $user->setEmail($email);
- $user->setUserName($username);
- $user->setRealName($real_name);
- if ($pass1 !== null && $pass1 === $pass2) {
- $user->setPassword($pass1);
- }
- }
- }
-
- if ($user) {
- // Approving for the first time? Send a confirmation email
- if ($approved && !$user->getPreference('verified_by_admin') && $user->getPreference('sessiontime') == 0) {
- I18N::init($user->getPreference('language'));
- Mail::systemMessage(
- $WT_TREE,
- $user,
- I18N::translate('Approval of account at %s', WT_BASE_URL),
- I18N::translate('The administrator at the webtrees site %s has approved your application for an account. You may now sign in by accessing the following link: %s', WT_BASE_URL, WT_BASE_URL)
- );
- }
-
- $user
- ->setPreference('theme', $theme)
- ->setPreference('language', $language)
- ->setPreference('TIMEZONE', $timezone)
- ->setPreference('contactmethod', $contact_method)
- ->setPreference('comment', $comment)
- ->setPreference('auto_accept', $auto_accept ? '1' : '0')
- ->setPreference('visibleonline', $visible_online ? '1' : '0')
- ->setPreference('verified', $verified ? '1' : '0')
- ->setPreference('verified_by_admin', $approved ? '1' : '0');
-
- // We cannot change our own admin status. Another admin will need to do it.
- if ($user->getUserId() !== Auth::id()) {
- $user->setPreference('canadmin', $canadmin ? '1' : '0');
- }
-
- foreach (Tree::getAll() as $tree) {
- $tree->setUserPreference($user, 'gedcomid', Filter::post('gedcomid' . $tree->getTreeId(), WT_REGEX_XREF));
- $tree->setUserPreference($user, 'canedit', Filter::post('canedit' . $tree->getTreeId(), implode('|', array_keys($ALL_EDIT_OPTIONS))));
- if (Filter::post('gedcomid' . $tree->getTreeId(), WT_REGEX_XREF)) {
- $tree->setUserPreference($user, 'RELATIONSHIP_PATH_LENGTH', Filter::postInteger('RELATIONSHIP_PATH_LENGTH' . $tree->getTreeId(), 0, 10, 0));
- } else {
- // Do not allow a path length to be set if the individual ID is not
- $tree->setUserPreference($user, 'RELATIONSHIP_PATH_LENGTH', null);
- }
- }
- }
- }
-
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
-
- return;
-}
-
-switch (Filter::get('action')) {
-case 'load_json':
- // Generate an AJAX/JSON response for datatables to load a block of rows
- $search = Filter::postArray('search');
- $search = $search['value'];
- $start = Filter::postInteger('start');
- $length = Filter::postInteger('length');
- $order = Filter::postArray('order');
-
- $sql_select =
- "SELECT SQL_CACHE SQL_CALC_FOUND_ROWS '', u.user_id, user_name, real_name, email, us1.setting_value, us2.setting_value, NULL, us3.setting_value, NULL, us4.setting_value, us5.setting_value" .
- " FROM `##user` u" .
- " LEFT JOIN `##user_setting` us1 ON (u.user_id=us1.user_id AND us1.setting_name='language')" .
- " LEFT JOIN `##user_setting` us2 ON (u.user_id=us2.user_id AND us2.setting_name='reg_timestamp')" .
- " LEFT JOIN `##user_setting` us3 ON (u.user_id=us3.user_id AND us3.setting_name='sessiontime')" .
- " LEFT JOIN `##user_setting` us4 ON (u.user_id=us4.user_id AND us4.setting_name='verified')" .
- " LEFT JOIN `##user_setting` us5 ON (u.user_id=us5.user_id AND us5.setting_name='verified_by_admin')" .
- " WHERE u.user_id > 0";
-
- $args = array();
-
- if ($search) {
- $sql_select .= " AND (user_name LIKE CONCAT('%', :search_1, '%') OR real_name LIKE CONCAT('%', :search_2, '%') OR email LIKE CONCAT('%', :search_3, '%'))";
- $args['search_1'] = $search;
- $args['search_2'] = $search;
- $args['search_3'] = $search;
- }
-
- if ($order) {
- $sql_select .= " ORDER BY ";
- foreach ($order as $key => $value) {
- if ($key > 0) {
- $sql_select .= ',';
- }
- // Datatables numbers columns 0, 1, 2
- // MySQL numbers columns 1, 2, 3
- switch ($value['dir']) {
- case 'asc':
- $sql_select .= (1 + $value['column']) . " ASC ";
- break;
- case 'desc':
- $sql_select .= (1 + $value['column']) . " DESC ";
- break;
- }
- }
- } else {
- $sql_select = " ORDER BY 1 ASC";
- }
-
- if ($length) {
- Auth::user()->setPreference('admin_users_page_size', $length);
- $sql_select .= " LIMIT :limit OFFSET :offset";
- $args['limit'] = $length;
- $args['offset'] = $start;
- }
-
- // This becomes a JSON list, not array, so need to fetch with numeric keys.
- $data = Database::prepare($sql_select)->execute($args)->fetchAll(PDO::FETCH_NUM);
-
- $installed_languages = array();
- foreach (I18N::installedLocales() as $installed_locale) {
- $installed_languages[$installed_locale->languageTag()] = $installed_locale->endonym();
- }
-
- // Reformat various columns for display
- foreach ($data as &$datum) {
- $user_id = $datum[1];
- $user_name = $datum[2];
-
- if ($user_id != Auth::id()) {
- $admin_options = '
' . /* I18N: Pretend to be another user, by logging in as them */
- I18N::translate('Masquerade as this user') . '' . '
' . I18N::translate('Delete') . '';
- } else {
- // Do not delete ourself!
- $admin_options = '';
- }
-
- $datum[0] = '
';
- // $datum[1] is the user ID
- // $datum[3] is the real name
- $datum[3] = '
' . Filter::escapeHtml($datum[3]) . ' ';
- // $datum[4] is the email address
- if ($user_id != Auth::id()) {
- $datum[4] = '
' . Filter::escapeHtml($datum[4]) . ' ';
- }
- // $datum[2] is the username
- $datum[2] = '
' . Filter::escapeHtml($datum[2]) . ' ';
- // $datum[5] is the langauge
- if (array_key_exists($datum[5], $installed_languages)) {
- $datum[5] = $installed_languages[$datum[5]];
- }
- // $datum[6] is the sortable registration timestamp
- $datum[7] = $datum[6] ? FunctionsDate::formatTimestamp($datum[6] + WT_TIMESTAMP_OFFSET) : '';
- if (date("U") - $datum[6] > 604800 && !$datum[10]) {
- $datum[7] = '
' . $datum[7] . ' ';
- }
- // $datum[8] is the sortable last-login timestamp
- if ($datum[8]) {
- $datum[9] = FunctionsDate::formatTimestamp($datum[8] + WT_TIMESTAMP_OFFSET) . '
' . I18N::timeAgo(WT_TIMESTAMP - $datum[8]);
- } else {
- $datum[9] = I18N::translate('Never');
- }
- $datum[10] = $datum[10] ? I18N::translate('yes') : I18N::translate('no');
- $datum[11] = $datum[11] ? I18N::translate('yes') : I18N::translate('no');
- }
-
- // Total filtered/unfiltered rows
- $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
- $recordsTotal = User::count();
-
- header('Content-type: application/json');
- // See http://www.datatables.net/usage/server-side
- echo json_encode(array(
- 'draw' => Filter::getInteger('draw'),
- 'recordsTotal' => $recordsTotal,
- 'recordsFiltered' => $recordsFiltered,
- 'data' => $data,
- ));
-
- return;
-
-case 'edit':
- $user_id = Filter::getInteger('user_id');
-
- if ($user_id === 0) {
- $controller->setPageTitle(I18N::translate('Add a user'));
- $tmp = new \stdClass;
- $tmp->user_id = '';
- $tmp->user_name = '';
- $tmp->real_name = '';
- $tmp->email = '';
- $user = new User($tmp);
- } else {
- $controller->setPageTitle(I18N::translate('Edit the user'));
- $user = User::find($user_id);
- }
-
- $controller
- ->pageHeader()
- ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
- ->addInlineJavascript('autocomplete();')
- ->addInlineJavascript('
- jQuery(".relpath").change(function() {
- var fieldIDx = jQuery(this).attr("id");
- var idNum = fieldIDx.replace("RELATIONSHIP_PATH_LENGTH","");
- var newIDx = "gedcomid"+idNum;
- if (jQuery("#"+newIDx).val() === "" && jQuery("#".fieldIDx).val() !== "0") {
- alert("' . I18N::translate('You must specify an individual record before you can restrict the user to their immediate family.') . '");
- jQuery(this).val("0");
- }
- });
- function regex_quote(str) {
- return str.replace(/[\\\\.?+*()[\](){}|]/g, "\\\\$&");
- }
- ');
-
- ?>
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-
- setPageTitle(I18N::translate('Delete inactive users'))
- ->pageHeader();
-
- ?>
-
-
-
- getPageTitle(); ?>
-
-
getPageTitle(); ?>
-
-
- getUserId()) == '1') {
- Log::addAuthenticationLog('Deleted user: ' . $user->getUserName());
- $user->delete();
- I18N::translate('The user %s has been deleted.', Filter::escapeHtml($user->getUserName()));
- }
- }
-
- header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME);
- break;
-default:
- $controller
- ->setPageTitle(I18N::translate('User administration'))
- ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
- ->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
- ->addInlineJavascript('
- jQuery(".table-user-list").dataTable({
- ' . I18N::datatablesI18N() . ',
- stateSave: true,
- stateDuration: 300,
- processing: true,
- serverSide: true,
- ajax: {
- "url": "' . WT_SCRIPT_NAME . '?action=load_json",
- "type": "POST"
- },
- search: {
- search: "' . Filter::escapeJs(Filter::get('filter')) . '"
- },
- autoWidth: false,
- pageLength: ' . Auth::user()->getPreference('admin_users_page_size', 10) . ',
- sorting: [[2, "asc"]],
- columns: [
- /* details */ { sortable: false },
- /* user-id */ { visible: false },
- /* user_name */ null,
- /* real_name */ null,
- /* email */ null,
- /* language */ null,
- /* registered (sort) */ { visible: false },
- /* registered */ { dataSort: 7 },
- /* last_login (sort) */ { visible: false },
- /* last_login */ { dataSort: 9 },
- /* verified */ null,
- /* approved */ null
- ]
- })
- .fnFilter("' . Filter::get('filter') . '"); // View the details of a newly created user
- ')
- ->pageHeader();
-
- ?>
-
-
- getPageTitle(); ?>
-
-
getPageTitle(); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
- */
-namespace Fisharebest\Webtrees;
-
-use Fisharebest\Webtrees\Controller\PageController;
-
-define('WT_SCRIPT_NAME', 'admin_users_bulk.php');
-require './includes/session.php';
-
-$controller = new PageController;
-$controller
- ->restrictAccess(Auth::isAdmin())
- ->setPageTitle(I18N::translate('Send broadcast messages'))
- ->pageHeader();
-
-?>
-
-
-
-
- getPageTitle(); ?>
-
-
-
getPageTitle(); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sources/ancestry.php b/sources/ancestry.php
deleted file mode 100644
index 65a628c..0000000
--- a/sources/ancestry.php
+++ /dev/null
@@ -1,174 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Defined in session.php
- *
- * @global Tree $WT_TREE
- */
-global $WT_TREE;
-
-use Fisharebest\Webtrees\Controller\AncestryController;
-use Fisharebest\Webtrees\Functions\FunctionsCharts;
-use Fisharebest\Webtrees\Functions\FunctionsEdit;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
-
-define('WT_SCRIPT_NAME', 'ancestry.php');
-require './includes/session.php';
-
-$MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
-
-$controller = new AncestryController;
-$controller
- ->restrictAccess(Module::isActiveChart($WT_TREE, 'ancestors_chart'))
- ->pageHeader()
- ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)
- ->addInlineJavascript('autocomplete();');
-
-?>
-
-
getPageTitle(); ?>
-
-error_message) {
- echo '
', $controller->error_message, '
';
-
- return;
-}
-switch ($controller->chart_style) {
-case 0:
- // List
- echo '
';
- $controller->printChildAscendancy($controller->root, 1, $controller->generations - 1);
- echo ' ';
- echo '
';
- break;
-case 1:
- echo '
';
- // Booklet
- // first page : show indi facts
- FunctionsPrint::printPedigreePerson($controller->root, $controller->showFull());
- // process the tree
- $ancestors = $controller->sosaAncestors($controller->generations - 1);
- $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders
-
- foreach ($ancestors as $sosa => $individual) {
- foreach ($individual->getChildFamilies() as $family) {
- FunctionsCharts::printSosaFamily($family->getXref(), $individual->getXref(), $sosa, '', '', '', $controller->show_cousins, $controller->showFull());
- }
- }
- echo '
';
- break;
-case 2:
- // Individual list
- $ancestors = $controller->sosaAncestors($controller->generations);
- $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders
- echo '
', FunctionsPrintLists::individualTable($ancestors, 'sosa'), '
';
- break;
-case 3:
- // Family list
- $ancestors = $controller->sosaAncestors($controller->generations - 1);
- $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders
- $families = array();
- foreach ($ancestors as $individual) {
- foreach ($individual->getChildFamilies() as $family) {
- $families[$family->getXref()] = $family;
- }
- }
- echo '
', FunctionsPrintLists::familyTable($families), '
';
- break;
-}
-echo '
';
diff --git a/sources/app/Auth.php b/sources/app/Auth.php
deleted file mode 100644
index 2abe107..0000000
--- a/sources/app/Auth.php
+++ /dev/null
@@ -1,194 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Authentication.
- */
-class Auth {
- // Privacy constants
- const PRIV_PRIVATE = 2; // Allows visitors to view the item
- const PRIV_USER = 1; // Allows members to access the item
- const PRIV_NONE = 0; // Allows managers to access the item
- const PRIV_HIDE = -1; // Hide the item to all users
-
- /**
- * Are we currently logged in?
- *
- * @return bool
- */
- public static function check() {
- return self::id() !== null;
- }
-
- /**
- * Is the specified/current user an administrator?
- *
- * @param User|null $user
- *
- * @return bool
- */
- public static function isAdmin(User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- return $user && $user->getPreference('canadmin') === '1';
- }
-
- /**
- * Is the specified/current user a manager of a tree?
- *
- * @param Tree $tree
- * @param User|null $user
- *
- * @return bool
- */
- public static function isManager(Tree $tree, User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- return self::isAdmin($user) || $user && $tree->getUserPreference($user, 'canedit') === 'admin';
- }
-
- /**
- * Is the specified/current user a moderator of a tree?
- *
- * @param Tree $tree
- * @param User|null $user
- *
- * @return bool
- */
- public static function isModerator(Tree $tree, User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- return self::isManager($tree, $user) || $user && $tree->getUserPreference($user, 'canedit') === 'accept';
- }
-
- /**
- * Is the specified/current user an editor of a tree?
- *
- * @param Tree $tree
- * @param User|null $user
- *
- * @return bool
- */
- public static function isEditor(Tree $tree, User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- return self::isModerator($tree, $user) || $user && $tree->getUserPreference($user, 'canedit') === 'edit';
- }
-
- /**
- * Is the specified/current user a member of a tree?
- *
- * @param Tree $tree
- * @param User|null $user
- *
- * @return bool
- */
- public static function isMember(Tree $tree, User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- return self::isEditor($tree, $user) || $user && $tree->getUserPreference($user, 'canedit') === 'access';
- }
-
- /**
- * What is the specified/current user's access level within a tree?
- *
- * @param Tree $tree
- * @param User|null $user
- *
- * @return int
- */
- public static function accessLevel(Tree $tree, User $user = null) {
- if ($user === null) {
- $user = self::user();
- }
-
- if (self::isManager($tree, $user)) {
- return self::PRIV_NONE;
- } elseif (self::isMember($tree, $user)) {
- return self::PRIV_USER;
- } else {
- return self::PRIV_PRIVATE;
- }
- }
-
- /**
- * Is the current visitor a search engine? The global is set in session.php
- *
- * @return bool
- */
- public static function isSearchEngine() {
- global $SEARCH_SPIDER;
-
- return $SEARCH_SPIDER;
- }
-
- /**
- * The ID of the authenticated user, from the current session.
- *
- * @return string|null
- */
- public static function id() {
- return Session::get('wt_user');
- }
-
- /**
- * The authenticated user, from the current session.
- *
- * @return User
- */
- public static function user() {
- $user = User::find(self::id());
- if ($user === null) {
- $visitor = new \stdClass;
- $visitor->user_id = '';
- $visitor->user_name = '';
- $visitor->real_name = '';
- $visitor->email = '';
-
- return new User($visitor);
- } else {
- return $user;
- }
- }
-
- /**
- * Login directly as an explicit user - for masquerading.
- *
- * @param User $user
- */
- public static function login(User $user) {
- Session::regenerate(false);
- Session::put('wt_user', $user->getUserId());
- }
-
- /**
- * End the session for the current user.
- */
- public static function logout() {
- Session::regenerate(true);
- }
-}
diff --git a/sources/app/Census/AbstractCensusColumn.php b/sources/app/Census/AbstractCensusColumn.php
deleted file mode 100644
index 746b3ed..0000000
--- a/sources/app/Census/AbstractCensusColumn.php
+++ /dev/null
@@ -1,172 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Definitions for a census column
- */
-class AbstractCensusColumn {
- /** @var CensusInterface */
- private $census;
-
- /** @var string */
- private $abbr;
-
- /** @var string */
- private $title;
-
- /**
- * Create a column for a census
- *
- * @param CensusInterface $census - The census to which this column forms part.
- * @param string $abbr - The abbrievated on-screen name "BiC"
- * @param string $title - The full column heading "Born in the county"
- */
- public function __construct(CensusInterface $census, $abbr, $title) {
- $this->census = $census;
- $this->abbr = $abbr;
- $this->title = $title;
- }
-
- /**
- * A short version of the column's name.
- *
- * @return string
- */
- public function abbreviation() {
- return $this->abbr;
- }
-
- /**
- * Extract the country (last part) of a place name.
- *
- * @param string $place - e.g. "London, England"
- *
- * @return string - e.g. "England"
- */
- protected function lastPartOfPlace($place) {
- $place = explode(', ', $place);
-
- return end($place);
- }
-
- /**
- * When did this census occur
- *
- * @return Date
- */
- public function date() {
- return new Date($this->census->censusDate());
- }
-
- /**
- * Find the father of an individual
- *
- * @param Individual $individual
- *
- * @return Individual|null
- */
- public function father(Individual $individual) {
- $family = $individual->getPrimaryChildFamily();
-
- if ($family) {
- return $family->getHusband();
- } else {
- return null;
- }
- }
-
- /**
- * Find the mother of an individual
- *
- * @param Individual $individual
- *
- * @return Individual|null
- */
- public function mother(Individual $individual) {
- $family = $individual->getPrimaryChildFamily();
-
- if ($family) {
- return $family->getWife();
- } else {
- return null;
- }
- }
-
- /**
- * Remove the country of a place name, where it is the same as the census place
- *
- * @param string $place - e.g. "London, England"
- *
- * @return string - e.g. "London" (for census of England) and "London, England" elsewhere
- */
- protected function notCountry($place) {
- $parts = explode(', ', $place);
-
- if (end($parts) === $this->place()) {
- return implode(', ', array_slice($parts, 0, -1));
- } else {
- return $place;
- }
- }
-
- /**
- * Where did this census occur
- *
- * @return string
- */
- public function place() {
- return $this->census->censusPlace();
- }
-
- /**
- * Find the current spouse family of an individual
- *
- * @param Individual $individual
- *
- * @return Family|null
- */
- public function spouseFamily(Individual $individual) {
- // Exclude families that were created after this census date
- $families = array();
- foreach ($individual->getSpouseFamilies() as $family) {
- if (Date::compare($family->getMarriageDate(), $this->date()) <= 0) {
- $families[] = $family;
- }
- }
-
- if (empty($families)) {
- return null;
- } else {
- usort($families, function (Family $x, Family $y) { return Date::compare($x->getMarriageDate(), $y->getMarriageDate()); });
-
- return end($families);
- }
- }
-
- /**
- * The full version of the column's name.
- *
- * @return string
- */
- public function title() {
- return $this->title;
- }
-}
diff --git a/sources/app/Census/AbstractCensusColumnCondition.php b/sources/app/Census/AbstractCensusColumnCondition.php
deleted file mode 100644
index e5ad57e..0000000
--- a/sources/app/Census/AbstractCensusColumnCondition.php
+++ /dev/null
@@ -1,186 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Marital status.
- */
-abstract class AbstractCensusColumnCondition extends AbstractCensusColumn implements CensusColumnInterface {
- /* Text to display for married males */
- protected $husband = '';
-
- /* Text to display for married females */
- protected $wife = '';
-
- /* Text to display for unmarried males */
- protected $bachelor = '';
-
- /* Text to display for unmarried females */
- protected $spinster = '';
-
- /* Text to display for male children */
- protected $boy = '';
-
- /* Text to display for female children */
- protected $girl = '';
-
- /* Text to display for divorced males */
- protected $divorce = '';
-
- /* Text to display for divorced females */
- protected $divorcee = '';
-
- /* Text to display for widowed males */
- protected $widower = '';
-
- /* Text to display for widowed females */
- protected $widow = '';
-
- /* At what age is this individual recorded as an adult */
- protected $age_adult = 15;
-
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $family = $this->spouseFamily($individual);
- $sex = $individual->getSex();
-
- if ($family === null || count($family->getFacts('_NMR')) > 0) {
- if ($this->isChild($individual)) {
- return $this->conditionChild($sex);
- } else {
- return $this->conditionSingle($sex);
- }
- } elseif (count($family->getFacts('DIV')) > 0) {
- return $this->conditionDivorced($sex);
- } else {
- $spouse = $family->getSpouse($individual);
- if ($spouse instanceof Individual && $this->isDead($spouse)) {
- return $this->conditionWidowed($sex);
- } else {
- return $this->conditionMarried($sex);
- }
- }
- }
-
- /**
- * How is this condition written in a census column.
- *
- * @param string $sex
- *
- * @return string
- */
- private function conditionChild($sex) {
- if ($sex === 'F') {
- return $this->girl;
- } else {
- return $this->boy;
- }
- }
-
- /**
- * How is this condition written in a census column.
- *
- * @param string $sex
- *
- * @return string
- */
- private function conditionDivorced($sex) {
- if ($sex === 'F') {
- return $this->divorcee;
- } else {
- return $this->divorce;
- }
- }
-
- /**
- * How is this condition written in a census column.
- *
- * @param string $sex
- *
- * @return string
- */
- private function conditionMarried($sex) {
- if ($sex === 'F') {
- return $this->wife;
- } else {
- return $this->husband;
- }
- }
-
- /**
- * How is this condition written in a census column.
- *
- * @param string $sex
- *
- * @return string
- */
- private function conditionSingle($sex) {
- if ($sex === 'F') {
- return $this->spinster;
- } else {
- return $this->bachelor;
- }
- }
-
- /**
- * How is this condition written in a census column.
- *
- * @param string $sex
- *
- * @return string
- */
- private function conditionWidowed($sex) {
- if ($sex === 'F') {
- return $this->widow;
- } else {
- return $this->widower;
- }
- }
-
- /**
- * Is the individual a child.
- *
- * @param Individual $individual
- *
- * @return bool
- */
- private function isChild(Individual $individual) {
- $age = (int) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
-
- return $age < $this->age_adult;
- }
-
- /**
- * Is the individual dead.
- *
- * @param Individual $individual
- *
- * @return bool
- */
- private function isDead(Individual $individual) {
- return $individual->getDeathDate()->isOK() && Date::compare($individual->getDeathDate(), $this->date()) < 0;
- }
-}
diff --git a/sources/app/Census/Census.php b/sources/app/Census/Census.php
deleted file mode 100644
index f108159..0000000
--- a/sources/app/Census/Census.php
+++ /dev/null
@@ -1,37 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class Census {
- /**
- * @return CensusPlaceInterface[]
- */
- public static function allCensusPlaces() {
- return array(
- new CensusOfCzechRepublic,
- new CensusOfDenmark,
- new CensusOfDeutschland,
- new CensusOfEngland,
- new CensusOfFrance,
- new CensusOfScotland,
- new CensusOfUnitedStates,
- new CensusOfWales,
- );
- }
-}
diff --git a/sources/app/Census/CensusColumnAge.php b/sources/app/Census/CensusColumnAge.php
deleted file mode 100644
index 1a2630b..0000000
--- a/sources/app/Census/CensusColumnAge.php
+++ /dev/null
@@ -1,36 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's age.
- */
-class CensusColumnAge extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
- }
-}
diff --git a/sources/app/Census/CensusColumnAgeFemale.php b/sources/app/Census/CensusColumnAgeFemale.php
deleted file mode 100644
index f315168..0000000
--- a/sources/app/Census/CensusColumnAgeFemale.php
+++ /dev/null
@@ -1,40 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The age of a female individual.
- */
-class CensusColumnAgeFemale extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() === 'M') {
- return '';
- } else {
- return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnAgeFemale5Years.php b/sources/app/Census/CensusColumnAgeFemale5Years.php
deleted file mode 100644
index 79147cb..0000000
--- a/sources/app/Census/CensusColumnAgeFemale5Years.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The age of a female individual (rounded down to the nearest 5 years).
- */
-class CensusColumnAgeFemale5Years extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() === 'M') {
- return '';
- } else {
- $years = Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
- if ($years > 15) {
- $years -= $years % 5;
- }
-
- return (string) $years;
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnAgeMale.php b/sources/app/Census/CensusColumnAgeMale.php
deleted file mode 100644
index 9d9bb59..0000000
--- a/sources/app/Census/CensusColumnAgeMale.php
+++ /dev/null
@@ -1,40 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The age of a male individual.
- */
-class CensusColumnAgeMale extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() === 'F') {
- return '';
- } else {
- return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnAgeMale5Years.php b/sources/app/Census/CensusColumnAgeMale5Years.php
deleted file mode 100644
index 26f4f7a..0000000
--- a/sources/app/Census/CensusColumnAgeMale5Years.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The age of a male individual (rounded down to the nearest 5 years).
- */
-class CensusColumnAgeMale5Years extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() === 'F') {
- return '';
- } else {
- $years = Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
- if ($years > 15) {
- $years -= $years % 5;
- }
-
- return (string) $years;
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnAgeMarried.php b/sources/app/Census/CensusColumnAgeMarried.php
deleted file mode 100644
index 04cba56..0000000
--- a/sources/app/Census/CensusColumnAgeMarried.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * At what age did the individual marry.
- */
-class CensusColumnAgeMarried extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getBirthDate()->isOK()) {
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getFacts('MARR', true) as $fact) {
- if ($fact->getDate()->isOK()) {
- return Date::getAge($individual->getBirthDate(), $fact->getDate(), 0);
- }
- }
- }
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDate.php b/sources/app/Census/CensusColumnBirthDate.php
deleted file mode 100644
index 9073c3b..0000000
--- a/sources/app/Census/CensusColumnBirthDate.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDate extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $individual->getEstimatedBirthDate()->minimumDate()->format('%j %n %Y');
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDay.php b/sources/app/Census/CensusColumnBirthDay.php
deleted file mode 100644
index 55f5383..0000000
--- a/sources/app/Census/CensusColumnBirthDay.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDay extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $individual->getEstimatedBirthDate()->minimumDate()->format('%j');
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDayDotMonthYear.php b/sources/app/Census/CensusColumnBirthDayDotMonthYear.php
deleted file mode 100644
index e81a64e..0000000
--- a/sources/app/Census/CensusColumnBirthDayDotMonthYear.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDayDotMonthYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_date = $individual->getBirthDate();
-
- if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) {
- return $birth_date->minimumDate()->format('%j. %F %Y');
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDayMonthSlashYear.php b/sources/app/Census/CensusColumnBirthDayMonthSlashYear.php
deleted file mode 100644
index e75c715..0000000
--- a/sources/app/Census/CensusColumnBirthDayMonthSlashYear.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDayMonthSlashYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_date = $individual->getBirthDate();
-
- if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) {
- return $birth_date->minimumDate()->format('%j %M/%Y');
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDaySlashMonth.php b/sources/app/Census/CensusColumnBirthDaySlashMonth.php
deleted file mode 100644
index 59e90be..0000000
--- a/sources/app/Census/CensusColumnBirthDaySlashMonth.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDaySlashMonth extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_date = $individual->getBirthDate();
-
- if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) {
- return $birth_date->minimumDate()->format('%j/%n');
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthDaySlashMonthYear.php b/sources/app/Census/CensusColumnBirthDaySlashMonthYear.php
deleted file mode 100644
index 9261245..0000000
--- a/sources/app/Census/CensusColumnBirthDaySlashMonthYear.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthDaySlashMonthYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_date = $individual->getBirthDate();
-
- if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) {
- return $birth_date->minimumDate()->format('%j/%n %Y');
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthMonth.php b/sources/app/Census/CensusColumnBirthMonth.php
deleted file mode 100644
index 07cb9ff..0000000
--- a/sources/app/Census/CensusColumnBirthMonth.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthMonth extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $individual->getEstimatedBirthDate()->minimumDate()->format('%M');
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthPlace.php b/sources/app/Census/CensusColumnBirthPlace.php
deleted file mode 100644
index a4fc736..0000000
--- a/sources/app/Census/CensusColumnBirthPlace.php
+++ /dev/null
@@ -1,47 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's birth place.
- */
-class CensusColumnBirthPlace extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_place = $individual->getBirthPlace();
- $census_place = $this->place();
-
- // Ignore the census country
- if ($birth_place === $census_place) {
- return '';
- }
-
- if (substr($birth_place, -strlen($census_place) - 2) === ', ' . $census_place) {
- return substr($birth_place, 0, -strlen($census_place) - 2);
- } else {
- return $birth_place;
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthPlaceSimple.php b/sources/app/Census/CensusColumnBirthPlaceSimple.php
deleted file mode 100644
index 30f8000..0000000
--- a/sources/app/Census/CensusColumnBirthPlaceSimple.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's birth place.
- */
-class CensusColumnBirthPlaceSimple extends CensusColumnBirthPlace implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $this->lastPartOfPlace(parent::generate($individual, $head));
- }
-}
diff --git a/sources/app/Census/CensusColumnBirthYear.php b/sources/app/Census/CensusColumnBirthYear.php
deleted file mode 100644
index 21ec63f..0000000
--- a/sources/app/Census/CensusColumnBirthYear.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's date of birth.
- */
-class CensusColumnBirthYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $individual->getEstimatedBirthDate()->minimumDate()->format('%Y');
- }
-}
diff --git a/sources/app/Census/CensusColumnBornForeignParts.php b/sources/app/Census/CensusColumnBornForeignParts.php
deleted file mode 100644
index 653993b..0000000
--- a/sources/app/Census/CensusColumnBornForeignParts.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Was the individual born in "foreign parts".
- */
-class CensusColumnBornForeignParts extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_place = explode(', ', $individual->getBirthPlace());
- $birth_place = end($birth_place);
- $census_place = $this->place();
-
- if ($birth_place === 'Wales') {
- $birth_place = 'England';
- }
-
- if ($census_place === 'Wales') {
- $census_place = 'England';
- }
-
- if ($birth_place === $census_place || $birth_place === '') {
- return '';
- } elseif ($birth_place === 'England' || $birth_place === 'Scotland' || $birth_place === 'Ireland') {
- return substr($birth_place, 0, 1);
- } else {
- return 'F';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnChildrenBornAlive.php b/sources/app/Census/CensusColumnChildrenBornAlive.php
deleted file mode 100644
index ff0c9f9..0000000
--- a/sources/app/Census/CensusColumnChildrenBornAlive.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The number of children born alive.
- */
-class CensusColumnChildrenBornAlive extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() !== 'F') {
- return '';
- }
-
- $count = 0;
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- if (
- $child->getBirthDate()->isOK() &&
- Date::compare($child->getBirthDate(), $this->date()) < 0 &&
- $child->getBirthDate() != $child->getDeathDate()
- ) {
- $count++;
- }
- }
- }
-
- return (string) $count;
- }
-}
diff --git a/sources/app/Census/CensusColumnChildrenDied.php b/sources/app/Census/CensusColumnChildrenDied.php
deleted file mode 100644
index 5645b2e..0000000
--- a/sources/app/Census/CensusColumnChildrenDied.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The number of children who have died.
- */
-class CensusColumnChildrenDied extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() !== 'F') {
- return '';
- }
-
- $count = 0;
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- if (
- $child->getBirthDate()->isOK() &&
- Date::compare($child->getBirthDate(), $this->date()) < 0 &&
- $child->getBirthDate() != $child->getDeathDate() &&
- $child->getDeathDate()->isOK() &&
- Date::compare($child->getDeathDate(), $this->date()) < 0
- ) {
- $count++;
- }
- }
- }
-
- return (string) $count;
- }
-}
diff --git a/sources/app/Census/CensusColumnChildrenLiving.php b/sources/app/Census/CensusColumnChildrenLiving.php
deleted file mode 100644
index 13e2803..0000000
--- a/sources/app/Census/CensusColumnChildrenLiving.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The number of children who are still living.
- */
-class CensusColumnChildrenLiving extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($individual->getSex() !== 'F') {
- return '';
- }
-
- $count = 0;
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- if (
- $child->getBirthDate()->isOK() &&
- Date::compare($child->getBirthDate(), $this->date()) < 0 &&
- $child->getBirthDate() != $child->getDeathDate() &&
- (!$child->getDeathDate()->isOK() || Date::compare($child->getDeathDate(), $this->date()) > 0)
- ) {
- $count++;
- }
- }
- }
-
- return (string) $count;
- }
-}
diff --git a/sources/app/Census/CensusColumnConditionDanish.php b/sources/app/Census/CensusColumnConditionDanish.php
deleted file mode 100644
index d3ea109..0000000
--- a/sources/app/Census/CensusColumnConditionDanish.php
+++ /dev/null
@@ -1,37 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionDanish extends CensusColumnConditionEnglish {
- /* Text to display for married individuals */
- protected $husband = 'Gift';
- protected $wife = 'Gift';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = 'Ugift';
- protected $spinster = 'Ugift';
-
- /* Text to display for divorced individuals */
- protected $divorce = 'Skilt';
- protected $divorcee = 'Skilt';
-
- /* Text to display for widowed individuals */
- protected $widower = 'Gift';
- protected $widow = 'Gift';
-}
diff --git a/sources/app/Census/CensusColumnConditionEnglish.php b/sources/app/Census/CensusColumnConditionEnglish.php
deleted file mode 100644
index 74acfa6..0000000
--- a/sources/app/Census/CensusColumnConditionEnglish.php
+++ /dev/null
@@ -1,37 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionEnglish extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = 'Mar';
- protected $wife = 'Mar';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = 'Unm';
- protected $spinster = 'Unm';
-
- /* Text to display for divorced individuals */
- protected $divorce = 'Div';
- protected $divorcee = 'Div';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = 'Wid';
- protected $widow = 'Wid';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchFemme.php b/sources/app/Census/CensusColumnConditionFrenchFemme.php
deleted file mode 100644
index d893356..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchFemme.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchFemme extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '';
- protected $wife = '1';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '';
- protected $spinster = '';
-
- /* Text to display for children */
- protected $boy = '';
- protected $girl = '';
-
- /* Text to display for divorced individuals */
- protected $divorce = '';
- protected $divorcee = '1';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '';
- protected $widow = '';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchFille.php b/sources/app/Census/CensusColumnConditionFrenchFille.php
deleted file mode 100644
index b1c67ba..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchFille.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchFille extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '';
- protected $wife = '';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '';
- protected $spinster = '1';
-
- /* Text to display for children */
- protected $boy = '';
- protected $girl = '1';
-
- /* Text to display for divorced individuals */
- protected $divorce = '';
- protected $divorcee = '';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '';
- protected $widow = '';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchGarcon.php b/sources/app/Census/CensusColumnConditionFrenchGarcon.php
deleted file mode 100644
index 9eb2f21..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchGarcon.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchGarcon extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '';
- protected $wife = '';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '1';
- protected $spinster = '';
-
- /* Text to display for children */
- protected $boy = '1';
- protected $girl = '';
-
- /* Text to display for divorced individuals */
- protected $divorce = '';
- protected $divorcee = '';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '';
- protected $widow = '';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchHomme.php b/sources/app/Census/CensusColumnConditionFrenchHomme.php
deleted file mode 100644
index a7e5d1a..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchHomme.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchHomme extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '1';
- protected $wife = '';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '';
- protected $spinster = '';
-
- /* Text to display for children */
- protected $boy = '';
- protected $girl = '';
-
- /* Text to display for divorced individuals */
- protected $divorce = '1';
- protected $divorcee = '';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '';
- protected $widow = '';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchVeuf.php b/sources/app/Census/CensusColumnConditionFrenchVeuf.php
deleted file mode 100644
index 2e429ec..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchVeuf.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchVeuf extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '';
- protected $wife = '';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '';
- protected $spinster = '';
-
- /* Text to display for children */
- protected $boy = '';
- protected $girl = '';
-
- /* Text to display for divorced individuals */
- protected $divorce = '';
- protected $divorcee = '';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '1';
- protected $widow = '';
-}
diff --git a/sources/app/Census/CensusColumnConditionFrenchVeuve.php b/sources/app/Census/CensusColumnConditionFrenchVeuve.php
deleted file mode 100644
index c0513bd..0000000
--- a/sources/app/Census/CensusColumnConditionFrenchVeuve.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionFrenchVeuve extends AbstractCensusColumnCondition {
- /* Text to display for married individuals */
- protected $husband = '';
- protected $wife = '';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = '';
- protected $spinster = '';
-
- /* Text to display for children */
- protected $boy = '';
- protected $girl = '';
-
- /* Text to display for divorced individuals */
- protected $divorce = '';
- protected $divorcee = '';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = '';
- protected $widow = '1';
-}
diff --git a/sources/app/Census/CensusColumnConditionUs.php b/sources/app/Census/CensusColumnConditionUs.php
deleted file mode 100644
index e2d6c41..0000000
--- a/sources/app/Census/CensusColumnConditionUs.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Marital status.
- */
-class CensusColumnConditionUs extends CensusColumnConditionEnglish {
- /* Text to display for married individuals */
- protected $husband = 'M';
- protected $wife = 'M';
-
- /* Text to display for unmarried individuals */
- protected $bachelor = 'S';
- protected $spinster = 'S';
-
- /* Text to display for children */
- protected $boy = 'S';
- protected $girl = 'S';
-
- /* Text to display for divorced individuals */
- protected $divorce = 'D';
- protected $divorcee = 'D';
-
- /* Text to display for widowed individuals (not yet implemented) */
- protected $widower = 'W';
- protected $widow = 'W';
-}
diff --git a/sources/app/Census/CensusColumnFatherBirthPlace.php b/sources/app/Census/CensusColumnFatherBirthPlace.php
deleted file mode 100644
index 5e54a98..0000000
--- a/sources/app/Census/CensusColumnFatherBirthPlace.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Birth place of the individual's fther.
- */
-class CensusColumnFatherBirthPlace extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $father = $this->father($individual);
-
- if ($father) {
- return $this->notCountry($father->getBirthPlace());
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnFatherBirthPlaceSimple.php b/sources/app/Census/CensusColumnFatherBirthPlaceSimple.php
deleted file mode 100644
index 4bcbd4d..0000000
--- a/sources/app/Census/CensusColumnFatherBirthPlaceSimple.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's father's birth place.
- */
-class CensusColumnFatherBirthPlaceSimple extends CensusColumnFatherBirthPlace implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $this->lastPartOfPlace(parent::generate($individual, $head));
- }
-}
diff --git a/sources/app/Census/CensusColumnFatherForeign.php b/sources/app/Census/CensusColumnFatherForeign.php
deleted file mode 100644
index 05837de..0000000
--- a/sources/app/Census/CensusColumnFatherForeign.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Is the individual's father a foreigner.
- */
-class CensusColumnFatherForeign extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $father = $this->father($individual);
-
- if ($father && $this->lastPartOfPlace($father->getBirthPlace()) !== $this->place()) {
- return 'Y';
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnFullName.php b/sources/app/Census/CensusColumnFullName.php
deleted file mode 100644
index 0f8ab6d..0000000
--- a/sources/app/Census/CensusColumnFullName.php
+++ /dev/null
@@ -1,69 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnFullName extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $name = $this->nameAtCensusDate($individual, $this->date());
-
- return strip_tags($name['full']);
- }
-
- /**
- * What was an individual's likely name on a given date, allowing
- * for marriages and married names.
- *
- * @param Individual $individual
- * @param Date $census_date
- *
- * @return string[]
- */
- protected function nameAtCensusDate(Individual $individual, Date $census_date) {
- $names = $individual->getAllNames();
- $name = $names[0];
-
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getFacts('MARR') as $marriage) {
- if ($marriage->getDate()->isOK() && Date::compare($marriage->getDate(), $census_date) < 0) {
- $spouse = $family->getSpouse($individual);
- foreach ($names as $individual_name) {
- foreach ($spouse->getAllNames() as $spouse_name) {
- if ($individual_name['type'] === '_MARNM' && $individual_name['surn'] === $spouse_name['surn']) {
- return $individual_name;
- }
- }
- }
- }
- }
- }
-
- return $name;
- }
-}
diff --git a/sources/app/Census/CensusColumnGivenNameInitial.php b/sources/app/Census/CensusColumnGivenNameInitial.php
deleted file mode 100644
index 01387fa..0000000
--- a/sources/app/Census/CensusColumnGivenNameInitial.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnGivenNameInitial extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getAllNames() as $name) {
- $given = $name['givn'];
- if (strpos($given, ' ') === false) {
- return $given;
- } else {
- return substr($given, 0, strpos($given, ' ') + 2);
- }
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnGivenNames.php b/sources/app/Census/CensusColumnGivenNames.php
deleted file mode 100644
index 6572a79..0000000
--- a/sources/app/Census/CensusColumnGivenNames.php
+++ /dev/null
@@ -1,39 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnGivenNames extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getAllNames() as $name) {
- return $name['givn'];
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnInterface.php b/sources/app/Census/CensusColumnInterface.php
deleted file mode 100644
index c6f4c33..0000000
--- a/sources/app/Census/CensusColumnInterface.php
+++ /dev/null
@@ -1,62 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Definitions for a census column
- */
-interface CensusColumnInterface {
- /**
- * A short version of the column's name.
- *
- * @return string
- */
- public function abbreviation();
-
- /**
- * When did this census occur
- *
- * @return Date
- */
- public function date();
-
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null);
-
- /**
- * Where did this census occur
- *
- * @return string
- */
- public function place();
-
- /**
- * The full version of the column's name.
- *
- * @return string
- */
- public function title();
-}
diff --git a/sources/app/Census/CensusColumnMarriedWithinYear.php b/sources/app/Census/CensusColumnMarriedWithinYear.php
deleted file mode 100644
index 6edeaab..0000000
--- a/sources/app/Census/CensusColumnMarriedWithinYear.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Did the individual marry within the last year.
- */
-class CensusColumnMarriedWithinYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getFacts('MARR') as $fact) {
- $marriage_jd = $fact->getDate()->julianDay();
- $census_jd = $this->date()->julianDay();
- if ($marriage_jd <= $census_jd && $marriage_jd >= $census_jd - 365) {
- return 'Y';
- }
- }
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnMonthIfBornWithinYear.php b/sources/app/Census/CensusColumnMonthIfBornWithinYear.php
deleted file mode 100644
index 986863c..0000000
--- a/sources/app/Census/CensusColumnMonthIfBornWithinYear.php
+++ /dev/null
@@ -1,42 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The month of birth, if within the last year.
- */
-class CensusColumnMonthIfBornWithinYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_jd = $individual->getBirthDate()->julianDay();
- $census_jd = $this->date()->julianDay();
- if ($birth_jd <= $census_jd && $birth_jd >= $census_jd - 365) {
- // Use the GEDCOM month, as we need this in English - for the US census
- return ucfirst(strtolower($individual->getBirthDate()->minimumDate()->format('%O')));
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnMonthIfMarriedWithinYear.php b/sources/app/Census/CensusColumnMonthIfMarriedWithinYear.php
deleted file mode 100644
index ed94153..0000000
--- a/sources/app/Census/CensusColumnMonthIfMarriedWithinYear.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The month of marriage, if within the last year.
- */
-class CensusColumnMonthIfMarriedWithinYear extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getFacts('MARR') as $fact) {
- $marriage_jd = $fact->getDate()->julianDay();
- $census_jd = $this->date()->julianDay();
- if ($marriage_jd <= $census_jd && $marriage_jd >= $census_jd - 365) {
- // Use the GEDCOM month, as we need this in English - for the US census
- return ucfirst(strtolower($fact->getDate()->minimumDate()->format('%O')));
- }
- }
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnMotherBirthPlace.php b/sources/app/Census/CensusColumnMotherBirthPlace.php
deleted file mode 100644
index 0d0d11a..0000000
--- a/sources/app/Census/CensusColumnMotherBirthPlace.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Birth place of the individual's mother.
- */
-class CensusColumnMotherBirthPlace extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $mother = $this->mother($individual);
-
- if ($mother) {
- return $this->notCountry($mother->getBirthPlace());
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnMotherBirthPlaceSimple.php b/sources/app/Census/CensusColumnMotherBirthPlaceSimple.php
deleted file mode 100644
index 485ce7b..0000000
--- a/sources/app/Census/CensusColumnMotherBirthPlaceSimple.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's mother's birth place.
- */
-class CensusColumnMotherBirthPlaceSimple extends CensusColumnMotherBirthPlace implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return $this->lastPartOfPlace(parent::generate($individual, $head));
- }
-}
diff --git a/sources/app/Census/CensusColumnMotherForeign.php b/sources/app/Census/CensusColumnMotherForeign.php
deleted file mode 100644
index 20d93ef..0000000
--- a/sources/app/Census/CensusColumnMotherForeign.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Is the individual's mother a foreigner.
- */
-class CensusColumnMotherForeign extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $mother = $this->mother($individual);
-
- if ($mother && $this->lastPartOfPlace($mother->getBirthPlace()) !== $this->place()) {
- return 'Y';
- } else {
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnNationality.php b/sources/app/Census/CensusColumnNationality.php
deleted file mode 100644
index 11ad4d8..0000000
--- a/sources/app/Census/CensusColumnNationality.php
+++ /dev/null
@@ -1,64 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The nationality of the individual.
- */
-class CensusColumnNationality extends AbstractCensusColumn implements CensusColumnInterface {
- /** @var array Convert a country name to a nationality */
- private $nationalities = array(
- 'England' => 'British',
- 'Scotland' => 'British',
- 'Wales' => 'British',
- 'Deutschland' => 'Deutsch',
- );
-
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $place = $individual->getBirthPlace();
-
- // No birthplace? Assume born in the same country.
- if ($place === '') {
- $place = $this->place();
- }
-
- // Did we emigrate or naturalise?
- foreach ($individual->getFacts('IMMI|EMIG|NATU', true) as $fact) {
- if (Date::compare($fact->getDate(), $this->date()) <= 0) {
- $place = $fact->getPlace()->getGedcomName();
- }
- }
-
- $place = $this->lastPartOfPlace($place);
-
- if (array_key_exists($place, $this->nationalities)) {
- return $this->nationalities[$place];
- } else {
- return $place;
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnNull.php b/sources/app/Census/CensusColumnNull.php
deleted file mode 100644
index 4e3bae5..0000000
--- a/sources/app/Census/CensusColumnNull.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * A column that we cannot generate.
- */
-class CensusColumnNull extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnOccupation.php b/sources/app/Census/CensusColumnOccupation.php
deleted file mode 100644
index f51d18b..0000000
--- a/sources/app/Census/CensusColumnOccupation.php
+++ /dev/null
@@ -1,39 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's occupation.
- */
-class CensusColumnOccupation extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getFacts('OCCU') as $fact) {
- return $fact->getValue();
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnRelationToHead.php b/sources/app/Census/CensusColumnRelationToHead.php
deleted file mode 100644
index fc439e4..0000000
--- a/sources/app/Census/CensusColumnRelationToHead.php
+++ /dev/null
@@ -1,42 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Relationshiop to head of household.
- */
-class CensusColumnRelationToHead extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($head === null) {
- return '';
- } elseif ($individual == $head) {
- return 'head';
- } else {
- return Functions::getCloseRelationshipName($head, $individual);
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnRelationToHeadGerman.php b/sources/app/Census/CensusColumnRelationToHeadGerman.php
deleted file mode 100644
index 88cac24..0000000
--- a/sources/app/Census/CensusColumnRelationToHeadGerman.php
+++ /dev/null
@@ -1,42 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * Relationshiop to head of household.
- */
-class CensusColumnRelationToHeadGerman extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- if ($head === null) {
- return '';
- } elseif ($individual == $head) {
- return 'Haushaltungsvorstand';
- } else {
- return Functions::getCloseRelationshipName($head, $individual);
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnReligion.php b/sources/app/Census/CensusColumnReligion.php
deleted file mode 100644
index c7d6ee2..0000000
--- a/sources/app/Census/CensusColumnReligion.php
+++ /dev/null
@@ -1,37 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's religion.
- */
-class CensusColumnReligion extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @todo Look for RELI tags (or subtags?)
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnSexMF.php b/sources/app/Census/CensusColumnSexMF.php
deleted file mode 100644
index ce9b4dc..0000000
--- a/sources/app/Census/CensusColumnSexMF.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's sex.
- */
-class CensusColumnSexMF extends AbstractCensusColumn implements CensusColumnInterface {
- /* Text to display for male individuals */
- protected $male = 'M';
-
- /* Text to display for female individuals */
- protected $female = 'F';
-
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- switch ($individual->getSex()) {
- case 'M':
- return $this->male;
- case 'F':
- return $this->female;
- default:
- return '';
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnSexMK.php b/sources/app/Census/CensusColumnSexMK.php
deleted file mode 100644
index f205839..0000000
--- a/sources/app/Census/CensusColumnSexMK.php
+++ /dev/null
@@ -1,24 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * The individual's sex.
- */
-class CensusColumnSexMK extends CensusColumnSexMF {
- /* Text to display for female individuals */
- protected $female = 'K';
-}
diff --git a/sources/app/Census/CensusColumnSexMZ.php b/sources/app/Census/CensusColumnSexMZ.php
deleted file mode 100644
index 1a86ba3..0000000
--- a/sources/app/Census/CensusColumnSexMZ.php
+++ /dev/null
@@ -1,24 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * The individual's sex.
- */
-class CensusColumnSexMZ extends CensusColumnSexMF {
- /* Text to display for female individuals */
- protected $female = 'Ž';
-}
diff --git a/sources/app/Census/CensusColumnSurname.php b/sources/app/Census/CensusColumnSurname.php
deleted file mode 100644
index d4986cc..0000000
--- a/sources/app/Census/CensusColumnSurname.php
+++ /dev/null
@@ -1,39 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnSurname extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getAllNames() as $name) {
- return $name['surname'];
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnSurnameGivenNameInitial.php b/sources/app/Census/CensusColumnSurnameGivenNameInitial.php
deleted file mode 100644
index b327427..0000000
--- a/sources/app/Census/CensusColumnSurnameGivenNameInitial.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnSurnameGivenNameInitial extends CensusColumnFullName {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $name = $this->nameAtCensusDate($individual, $this->date());
- $given = $name['givn'];
- if (strpos($given, ' ') === false) {
- return $name['surn'] . ', ' . $given;
- } else {
- return $name['surn'] . ', ' . substr($given, 0, strpos($given, ' ') + 2);
- }
- }
-}
diff --git a/sources/app/Census/CensusColumnSurnameGivenNames.php b/sources/app/Census/CensusColumnSurnameGivenNames.php
deleted file mode 100644
index 6d629c9..0000000
--- a/sources/app/Census/CensusColumnSurnameGivenNames.php
+++ /dev/null
@@ -1,39 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Individual;
-
-/**
- * The individual's full name.
- */
-class CensusColumnSurnameGivenNames extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- foreach ($individual->getAllNames() as $name) {
- return $name['surn'] . ', ' . $name['givn'];
- }
-
- return '';
- }
-}
diff --git a/sources/app/Census/CensusColumnYearsMarried.php b/sources/app/Census/CensusColumnYearsMarried.php
deleted file mode 100644
index 71690cb..0000000
--- a/sources/app/Census/CensusColumnYearsMarried.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Individual;
-
-/**
- * For how many years has the individual been married.
- */
-class CensusColumnYearsMarried extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual|null $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $marriage_date = null;
-
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getFacts('MARR', true) as $fact) {
- if ($fact->getDate()->isOK() && Date::compare($fact->getDate(), $this->date()) <= 0) {
- $marriage_date = $fact->getDate();
- }
- }
- }
-
- if ($marriage_date === null) {
- return '';
- } else {
- return (string) Date::getAge($marriage_date, $this->date(), 0);
- }
- }
-}
diff --git a/sources/app/Census/CensusInterface.php b/sources/app/Census/CensusInterface.php
deleted file mode 100644
index 4ffa9a6..0000000
--- a/sources/app/Census/CensusInterface.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-interface CensusInterface extends CensusPlaceInterface {
- /**
- * When did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusDate();
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns();
-}
diff --git a/sources/app/Census/CensusOfCzechRepublic.php b/sources/app/Census/CensusOfCzechRepublic.php
deleted file mode 100644
index ee40b2f..0000000
--- a/sources/app/Census/CensusOfCzechRepublic.php
+++ /dev/null
@@ -1,42 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfCzechRepublic extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfCzechRepublic1880(),
- new CensusOfCzechRepublic1921(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Česko';
- }
-}
diff --git a/sources/app/Census/CensusOfCzechRepublic1880.php b/sources/app/Census/CensusOfCzechRepublic1880.php
deleted file mode 100644
index e4c64d1..0000000
--- a/sources/app/Census/CensusOfCzechRepublic1880.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfCzechRepublic1880 extends CensusOfCzechRepublic implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '31 DEC 1880';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Jméno', ''),
- new CensusColumnSexMZ($this, 'Pohlaví', ''),
- new CensusColumnRelationToHead($this, 'Vztah', ''),
- new CensusColumnBirthDaySlashMonthYear($this, 'Narození', 'Datum narození'),
- new CensusColumnBirthPlace($this, 'Místo', 'Místo narození'),
- new CensusColumnNull($this, 'Přísluší', 'Domovské právo'),
- new CensusColumnReligion($this, 'Vyznání', ''),
- new CensusColumnNull($this, 'Stav', 'Rodinný stav'),
- new CensusColumnNull($this, 'Jazyk', 'Jazyk v obcování'),
- new CensusColumnOccupation($this, 'Povolání', ''),
- new CensusColumnNull($this, 'Postavení', 'Postavení v zaměstnání'),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfCzechRepublic1921.php b/sources/app/Census/CensusOfCzechRepublic1921.php
deleted file mode 100644
index f954052..0000000
--- a/sources/app/Census/CensusOfCzechRepublic1921.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfCzechRepublic1921 extends CensusOfCzechRepublic implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '15 FEB 1921';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Jméno', ''),
- new CensusColumnRelationToHead($this, 'Vztah', ''),
- new CensusColumnSexMZ($this, 'Pohlaví', ''),
- new CensusColumnNull($this, 'Stav', 'Rodinný stav'),
- new CensusColumnBirthDaySlashMonthYear($this, 'Narození', 'Datum narození'),
- new CensusColumnBirthPlace($this, 'Místo', 'Místo narození'),
- new CensusColumnNull($this, 'Přísluší', 'Domovské právo'),
- new CensusColumnNull($this, 'Jazyk', 'Jazyk v obcování'),
- new CensusColumnReligion($this, 'Vyznání', ''),
- new CensusColumnOccupation($this, 'Povolání', ''),
- new CensusColumnNull($this, 'Postavení', 'Postavení v zaměstnání'),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark.php b/sources/app/Census/CensusOfDenmark.php
deleted file mode 100644
index 27357e3..0000000
--- a/sources/app/Census/CensusOfDenmark.php
+++ /dev/null
@@ -1,62 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfDenmark1787(),
- new CensusOfDenmark1801(),
- new CensusOfDenmark1803(),
- new CensusOfDenmark1834(),
- new CensusOfDenmark1835(),
- new CensusOfDenmark1840(),
- new CensusOfDenmark1845(),
- new CensusOfDenmark1850(),
- new CensusOfDenmark1855(),
- new CensusOfDenmark1860(),
- new CensusOfDenmark1870(),
- new CensusOfDenmark1880(),
- new CensusOfDenmark1885(),
- new CensusOfDenmark1890(),
- new CensusOfDenmark1901(),
- new CensusOfDenmark1906(),
- new CensusOfDenmark1911(),
- new CensusOfDenmark1916(),
- new CensusOfDenmark1921(),
- new CensusOfDenmark1925(),
- new CensusOfDenmark1930(),
- new CensusOfDenmark1940(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Danmark';
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1787.php b/sources/app/Census/CensusOfDenmark1787.php
deleted file mode 100644
index c5f451c..0000000
--- a/sources/app/Census/CensusOfDenmark1787.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1787 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 JUL 1787';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1801.php b/sources/app/Census/CensusOfDenmark1801.php
deleted file mode 100644
index 90b3917..0000000
--- a/sources/app/Census/CensusOfDenmark1801.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1801 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1801';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1803.php b/sources/app/Census/CensusOfDenmark1803.php
deleted file mode 100644
index 7d13920..0000000
--- a/sources/app/Census/CensusOfDenmark1803.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1803 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1803';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Schleswig-Holstein, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1834.php b/sources/app/Census/CensusOfDenmark1834.php
deleted file mode 100644
index 2eef6a6..0000000
--- a/sources/app/Census/CensusOfDenmark1834.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1834 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '18 FEB 1834';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1835.php b/sources/app/Census/CensusOfDenmark1835.php
deleted file mode 100644
index f00b668..0000000
--- a/sources/app/Census/CensusOfDenmark1835.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1835 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '18 FEB 1835';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Schleswig-Holstein, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1840.php b/sources/app/Census/CensusOfDenmark1840.php
deleted file mode 100644
index e01afce..0000000
--- a/sources/app/Census/CensusOfDenmark1840.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1840 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1840';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1845.php b/sources/app/Census/CensusOfDenmark1845.php
deleted file mode 100644
index 560b3ad..0000000
--- a/sources/app/Census/CensusOfDenmark1845.php
+++ /dev/null
@@ -1,47 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1845 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1845';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1850.php b/sources/app/Census/CensusOfDenmark1850.php
deleted file mode 100644
index f767580..0000000
--- a/sources/app/Census/CensusOfDenmark1850.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1850 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1850';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1855.php b/sources/app/Census/CensusOfDenmark1855.php
deleted file mode 100644
index 5871118..0000000
--- a/sources/app/Census/CensusOfDenmark1855.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1855 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1855';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''), // Religion?
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1860.php b/sources/app/Census/CensusOfDenmark1860.php
deleted file mode 100644
index 83f7012..0000000
--- a/sources/app/Census/CensusOfDenmark1860.php
+++ /dev/null
@@ -1,52 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1860 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1860';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''), // Religion?
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1870.php b/sources/app/Census/CensusOfDenmark1870.php
deleted file mode 100644
index d7937cf..0000000
--- a/sources/app/Census/CensusOfDenmark1870.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1870 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1870';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnSexMK($this, 'Køn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnReligion($this, 'Religion', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1880.php b/sources/app/Census/CensusOfDenmark1880.php
deleted file mode 100644
index 35f2780..0000000
--- a/sources/app/Census/CensusOfDenmark1880.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1880 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1880';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnSexMK($this, 'Køn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnReligion($this, 'Religion', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1885.php b/sources/app/Census/CensusOfDenmark1885.php
deleted file mode 100644
index 615db60..0000000
--- a/sources/app/Census/CensusOfDenmark1885.php
+++ /dev/null
@@ -1,62 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1885 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1885';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'København, Danmark';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', ''),
- new CensusColumnSexMK($this, 'Køn', ''),
- new CensusColumnAge($this, 'Alder', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', ''),
- new CensusColumnReligion($this, 'Religion', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1890.php b/sources/app/Census/CensusOfDenmark1890.php
deleted file mode 100644
index efe91ed..0000000
--- a/sources/app/Census/CensusOfDenmark1890.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1890 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1890';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers fulde Navn.'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).'),
- new CensusColumnAge($this, 'Alder', 'Alder. Alderen anføres med det fyldte Aar, men for Børn, der ikke have fyldt 1 Aar, anføres „Under 1 Aar“ of Fødselsdagen.'),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).'),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund („Folkekirken“ eller andetSamfund, saasom „det frilutheranske“, „det romersk katholske“, det „mosaiske“ o.s.v.).'),
- new CensusColumnBirthPlace($this, 'Fødested', 'Fødested, nemlig Sognets og Amtets eller Kjøbstadens (eller Handelpladsens) Navn, og for de i Bilandene Fødte samt for Udlændinge Landet, hvori de ere fødte.'),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien (Husfader, Husmoder, Barn, Tjenestetyende, Logerende o.s.v.).'),
- new CensusColumnOccupation($this, 'Erhverv', 'Erhverv (Embede, Forretning, Næringsvej og Titel, samt Vedkommendes Stilling som Hovedperson eller Medhjælper, Forvalter, Svend eller Dreng o.s.v.). - Arten af Erhvervet (Gaardejer, Husmand, Grovsmed, Vognfabrikant, Høker o.s.v.). - Under Fattigforsørgelse.'),
- new CensusColumnNull($this, 'Erhvervsstedet', 'Erhvervsstedet (Beboelseskommunen eller hvilken anden Kommune).'),
- new CensusColumnNull($this, 'Døvstumme', 'Døvstumme.'),
- new CensusColumnNull($this, 'Døve', 'Døve (Hørelson aldeles berøvet).'),
- new CensusColumnNull($this, 'Blinde', 'Blinde (Synet aldeles borsvet).'),
- new CensusColumnNull($this, 'Idioter', 'Uden Forstandsovner (Idioter).'),
- new CensusColumnNull($this, 'Sindssyge', 'Sindssyge.'),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1901.php b/sources/app/Census/CensusOfDenmark1901.php
deleted file mode 100644
index 3414d60..0000000
--- a/sources/app/Census/CensusOfDenmark1901.php
+++ /dev/null
@@ -1,57 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1901 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1901';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“.'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).'),
- new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).'),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „uden for Trossamfund“).'),
- new CensusColumnBirthPlace($this, 'Fødested', 'Fødested 1) Indenlandsk Fødested: Kebstadens, Handelspladsens eller Sogneta og Amtets Navn (kan Amtet ikke angives, sættes vedkommende Landsdel, f. Eks. Fyn, Jlland osv.), 2) Fedt i Bilandene eller Udlandet: Landets Navn.'),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien (Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende (naar vedkommende har Skudsmaalsbog), Pensioner, logerende.'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1906.php b/sources/app/Census/CensusOfDenmark1906.php
deleted file mode 100644
index 5b1fed8..0000000
--- a/sources/app/Census/CensusOfDenmark1906.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1906 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1906';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1911.php b/sources/app/Census/CensusOfDenmark1911.php
deleted file mode 100644
index da20f35..0000000
--- a/sources/app/Census/CensusOfDenmark1911.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1911 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1911';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1916.php b/sources/app/Census/CensusOfDenmark1916.php
deleted file mode 100644
index a0a42ba..0000000
--- a/sources/app/Census/CensusOfDenmark1916.php
+++ /dev/null
@@ -1,52 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1916 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1916';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1921.php b/sources/app/Census/CensusOfDenmark1921.php
deleted file mode 100644
index b043df4..0000000
--- a/sources/app/Census/CensusOfDenmark1921.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1921 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 FEB 1921';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''),
- new CensusColumnBirthYear($this, 'Fødselsaar', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1925.php b/sources/app/Census/CensusOfDenmark1925.php
deleted file mode 100644
index bdc4362..0000000
--- a/sources/app/Census/CensusOfDenmark1925.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1925 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 NOV 1925';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''),
- new CensusColumnBirthYear($this, 'Fødselsaar', ''),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, 'Statsbergerferhold', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', 'Erhverv eller Livsstilling'),
- new CensusColumnNull($this, 'Bopæl', 'Bopæl den 5. Novbr. 1924'),
- new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1930.php b/sources/app/Census/CensusOfDenmark1930.php
deleted file mode 100644
index 152711c..0000000
--- a/sources/app/Census/CensusOfDenmark1930.php
+++ /dev/null
@@ -1,58 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1930 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 NOV 1930';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurnameGivenNames($this, 'Navn', ''),
- new CensusColumnNull($this, 'Bopæl', ''),
- new CensusColumnNull($this, 'Andetsteds', 'Hvis den i Rubrik 3 opførte Person har fast Bopæl andetsteds, anføres her den faste Bopæl'),
- new CensusColumnNull($this, 'Stede', 'Hvis den i Rubrik 3 opførte Person paa Tællingsdagen til Stede paa Tællingsstedet? Ja eller Nej.'),
- new CensusColumnNull($this, 'Bopæl', 'Bopæl den 5. Novbr. 1929'),
- new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
- new CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''),
- new CensusColumnBirthYear($this, 'Fødselsaar', ''),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, 'Statsbergerferhold', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- new CensusColumnNull($this, '', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDenmark1940.php b/sources/app/Census/CensusOfDenmark1940.php
deleted file mode 100644
index 81322dc..0000000
--- a/sources/app/Census/CensusOfDenmark1940.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDenmark1940 extends CensusOfDenmark implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 NOV 1940';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurnameGivenNames($this, 'Navn', ''),
- new CensusColumnNull($this, 'Nærværende', 'Hvis den i Rubrik 1 opførte Person er midleritidg nærværende d.v.s. har fast Bopæl ????? (er optaget under en anden Address i Folkeregistret), anføres her den faste Bopæls Adresse (Kommunens Navn og den fuldstændige Adresse i denne; for Udlændinge dog kun Landets Navn).'),
- new CensusColumnNull($this, 'Fraværende', 'Hvis den i Rubrik 1 opførte Person er midleritidg fraværende d.v.s. har fast Bopæl paa Tællingsstedet (er optaget underdenne Address i Folkeregistret), men den 5. Novemer ikke er til Stede paa Tællingsstedet, anføres her „fraværende“ og Adressen paa det midlertidige Opholdssted (ved Ophold i Udlandet anføres jun Landets Navn).'),
- new CensusColumnSexMK($this, 'Køn', 'Køn Mand (M) Kvinde (K)'),
- new CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''),
- new CensusColumnBirthYear($this, 'Fødselsaar', ''),
- new CensusColumnBirthPlace($this, 'Fødested', ''),
- new CensusColumnNull($this, 'Statsbergerferhold', ''),
- new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'),
- new CensusColumnNull($this, 'Indgaaelse', 'Date for det nuværende Ægteskabs Indgaaelse. NB." RUbrikken udfyldes ikke al Enkemaend, Enker, Separerede eller Fraskilte.'),
- new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
- new CensusColumnOccupation($this, 'Erhverv', ''),
- new CensusColumnNull($this, 'Virksomhedens', 'Virksomhedens (Branchens) Art'),
- new CensusColumnNull($this, 'Hustruen', 'Besvares kun af Hustruen og hjemmeboende Børn over 14 Aar'),
- new CensusColumnNull($this, 'Døtre', 'Besvares kun af hjemmeboende Døtre over 14 Aar'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschland.php b/sources/app/Census/CensusOfDeutschland.php
deleted file mode 100644
index 670940e..0000000
--- a/sources/app/Census/CensusOfDeutschland.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschland extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfDeutschland1819(),
- new CensusOfDeutschland1867(),
- new CensusOfDeutschlandNL1867(),
- new CensusOfDeutschland1900(),
- new CensusOfDeutschland1919(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Deutschland';
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschland1819.php b/sources/app/Census/CensusOfDeutschland1819.php
deleted file mode 100644
index 17cab5e..0000000
--- a/sources/app/Census/CensusOfDeutschland1819.php
+++ /dev/null
@@ -1,62 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschland1819 extends CensusOfDeutschland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'AUG 1819';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Mecklenburg-Schwerin, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, 'Nr.', 'Laufende Num̅er.'),
- new CensusColumnNull($this, 'Geschlecht', 'Ob männlichen oder weiblichen Geschlechts.'),
- new CensusColumnFullName($this, 'Name', 'Vor- und Zuname.'),
- new CensusColumnBirthYear($this, 'Geburtsdatum', 'Jahr und Tag der Geburt.'),
- new CensusColumnBirthPlace($this, 'Geburtsort', 'Geburtsort.'),
- new CensusColumnNull($this, 'Kirchspiel', 'Kirchspiel, wohin der Geburtsort gehört.'),
- new CensusColumnNull($this, '', 'leere Spalte'),
- new CensusColumnOccupation($this, 'Stand/Beruf', 'Stand und Gewerbe.'),
- new CensusColumnNull($this, 'Besitz', 'Grundbesitz.'),
- new CensusColumnNull($this, 'hier seit', 'Wie lange er schon hier ist.'),
- new CensusColumnNull($this, 'Familienstand', 'Ob ledig oder verheirathet.'),
- new CensusColumnReligion($this, 'Religion', 'Religion.'),
- new CensusColumnNull($this, 'Bemerkungen', 'Allgemeine Bemerkungen.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschland1867.php b/sources/app/Census/CensusOfDeutschland1867.php
deleted file mode 100644
index 43edd86..0000000
--- a/sources/app/Census/CensusOfDeutschland1867.php
+++ /dev/null
@@ -1,72 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschland1867 extends CensusOfDeutschland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '03 DEC 1867';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Mecklenburg-Schwerin, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, '1.Nr.', 'Ordnungs-Nummer (1-15).'),
- new CensusColumnGivenNames($this, '2.Vorname', 'I. Vor- und Familien-Name jeder Person. Vorname'),
- new CensusColumnSurname($this, '3.Familienname', 'I. Vor- und Familien-Name jeder Person. Familienname.'),
- new CensusColumnNull($this, '4.männlich', 'II. Geschlecht männlich.'),
- new CensusColumnNull($this, '5.weiblich', 'II. Geschlecht weiblich.'),
- new CensusColumnBirthYear($this, '6.Geburtsjahr', 'III. Alter.'),
- new CensusColumnReligion($this, '7.Religion', 'IV. Religionsbekenntnis.'),
- new CensusColumnNull($this, '8.ledig', 'V. Familienstand. ledig.'),
- new CensusColumnNull($this, '9.verehelicht', 'V. Familienstand. verehelicht.'),
- new CensusColumnNull($this, '10.verwittwet', 'V. Familienstand. verwittwet.'),
- new CensusColumnNull($this, '11.geschieden', 'V. Familienstand. geschieden.'),
- new CensusColumnRelationToHeadGerman($this, '12.Stellung', 'V. Familienstand. Verhältnis der Familienglieder zum Haushaltungsvorstand.'),
- new CensusColumnOccupation($this, '13.Stand/Beruf', 'VI. Stand, Beruf oder Vorbereitung zum Beruf, Arbeits- und Dienstverhältnis.'),
- new CensusColumnNull($this, '14.StA_M-S', 'VII. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.'),
- new CensusColumnNull($this, '15.StA', 'VII. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?'),
- new CensusColumnNull($this, '16.', 'VIII. Art des Aufenthalts am Zählungsort. Norddeutscher und Zollvereins- See- und Flußschiffer.'),
- new CensusColumnNull($this, '17.', 'VIII. Art des Aufenthalts am Zählungsort. Reisender im Gasthof.'),
- new CensusColumnNull($this, '18.', 'VIII. Art des Aufenthalts am Zählungsort. Gast der Familie (zum Besuch aus).'),
- new CensusColumnNull($this, '19.', 'VIII. Art des Aufenthalts am Zählungsort. Alle übrigen Anwesenden.'),
- new CensusColumnNull($this, '20.blind', 'IX. Besondere Mängel einzelner Individuen. blind auf beiden Augen.'),
- new CensusColumnNull($this, '21.taubstumm', 'IX. Besondere Mängel einzelner Individuen. taubstumm.'),
- new CensusColumnNull($this, '22.blödsinnig', 'IX. Besondere Mängel einzelner Individuen. blödsinnig.'),
- new CensusColumnNull($this, '23.irrsinnig', 'IX. Besondere Mängel einzelner Individuen. irrsinnig.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschland1900.php b/sources/app/Census/CensusOfDeutschland1900.php
deleted file mode 100644
index 3c64acb..0000000
--- a/sources/app/Census/CensusOfDeutschland1900.php
+++ /dev/null
@@ -1,76 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschland1900 extends CensusOfDeutschland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 DEC 1900';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Mecklenburg-Schwerin, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, 'Lfd.Nr.', 'Laufende Nummer'),
- new CensusColumnGivenNames($this, 'Vorname', 'Vorname'),
- new CensusColumnSurname($this, 'Familienname', 'Familienname'),
- new CensusColumnRelationToHeadGerman($this, 'Stellung', 'Verwandtschaft oder sonstige Stellung zum Haushaltungsvorstand'),
- new CensusColumnNull($this, 'männlich', 'Geschlecht männlich'),
- new CensusColumnNull($this, 'weiblich', 'Geschlecht weiblich'),
- new CensusColumnNull($this, 'Blind', 'Blind auf beiden Augen'),
- new CensusColumnNull($this, 'Taubstumm', 'Taubstumm'),
- new CensusColumnNull($this, 'Bemerkungen', 'Bemerkungen'),
- new CensusColumnNull($this, '', 'Nachfolgend die detaillierten Zählkartenangaben'),
- new CensusColumnFullName($this, 'ZK 1.Name', '1. Vor- und Familienname:'),
- new CensusColumnNull($this, 'ZK 2.Geschlecht', '2. Geschlecht:'),
- new CensusColumnNull($this, 'ZK 3.Familienstand', '3. Familienstand:'),
- new CensusColumnBirthDayDotMonthYear($this, 'ZK 4.Alter', '4. Alter: geboren den ... im Jahre ...'),
- new CensusColumnBirthPlace($this, 'ZK 5.Geburtsort', '5. Geburtsort: ... im Bezirk (Amt) ...'),
- new CensusColumnNull($this, 'ZK 5.Land/Provinz', 'für außerhalb des Großherzogthums Geborene auch Geburtsland, für in Preußen Geborene auch Provinz: ...'),
- new CensusColumnOccupation($this, 'ZK 6.Beruf/Stand', '6. Beruf, Stand, Erwerb, Gewerbe, Geschäft oder Nahrungszweig:'),
- new CensusColumnNull($this, 'ZK 7a.Gemeinde Wohnort', '7.a. Gemeinde (Ortschaft), in welcher der Wohnort (Wohnung), bei verheiratheten Personen der Familienwohnsitz liegt:'),
- new CensusColumnNull($this, 'ZK 7a.Land/Provinz', 'für außerhalb des Großherzogthums Wohnende auch Staat und für in Preußen Wohnende auch Provinz: ...'),
- new CensusColumnNull($this, 'ZK 7b.Gemeinde Erwerbsort', '7.b. Gemeinde (Ortschaft), in welcher der Beruf (die Erwerbsthätigkeit) zur Zeit ausgeübt wird oder zuletzt ausgeübt wurde:'),
- new CensusColumnNull($this, 'ZK 7b.Land/Provinz', 'für außerhalb des Großherzogthums Arbeitende auch Staat und für in Preußen Arbeitende auch Provinz: ...'),
- new CensusColumnReligion($this, 'ZK 8.Religion', '8. Religionsbekenntnis:'),
- new CensusColumnNull($this, 'ZK 9.Muttersprache', '9. Muttersprache (ob deutsch oder welche andere Sprache?):'),
- new CensusColumnNull($this, 'ZK 10.StA', '10. Staatsangehörigkeit:'),
- new CensusColumnNull($this, 'ZK 11.Dienstgrad', '11. Für Militärpersonen im aktiven Dienste: Dienstgrad:'),
- new CensusColumnNull($this, 'ZK 11.Einheit', 'Truppentheil, Kommando- oder Verwaltungsbehörde:'),
- new CensusColumnNull($this, 'ZK 12.Gebrechen', '12. Etwaige körperliche Mängel und Gebrechen:'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschland1919.php b/sources/app/Census/CensusOfDeutschland1919.php
deleted file mode 100644
index ca42da7..0000000
--- a/sources/app/Census/CensusOfDeutschland1919.php
+++ /dev/null
@@ -1,66 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschland1919 extends CensusOfDeutschland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '08 OCT 1919';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Mecklenburg-Schwerin, Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, 'Nummer', 'Laufende Nummer'),
- new CensusColumnGivenNames($this, 'Vorname', 'Vorname'),
- new CensusColumnSurname($this, 'Familienname', 'Familienname'),
- new CensusColumnRelationToHeadGerman($this, 'Stellung im Haushalt', 'Stellung im Haushalt'),
- new CensusColumnNull($this, 'männlich', 'Geschlecht männlich'),
- new CensusColumnNull($this, 'weiblich', 'Geschlecht weiblich'),
- new CensusColumnNull($this, 'Familienstand', 'Familienstand'),
- new CensusColumnBirthDay($this, 'Geburts-Tag', 'Geburts-Tag'),
- new CensusColumnBirthMonth($this, 'Geburts-Monat', 'Geburts-Monat'),
- new CensusColumnBirthYear($this, 'Geburts-Jahr', 'Geburts-Jahr'),
- new CensusColumnBirthPlace($this, 'Geburtsort', 'Name des Geburtsorts'),
- new CensusColumnNull($this, 'Amt, Kreis, Bezirk', 'Amt, Kreis oder sonstiger obrigkeitlicher Bezirk'),
- new CensusColumnNull($this, 'StA', 'Staatsangehörigkeit'),
- new CensusColumnNull($this, 'Gemeinde Brotversorgung', 'Gemeinde der Brotversorgung'),
- new CensusColumnNull($this, 'Wohn-/ Aufenthaltsort', 'Wohnort bei nur vorübergehend Anwesenden. Aufenthaltsort bei vorübergehend Abwesenden'),
- new CensusColumnNull($this, 'Dienstgrad', 'Für Militärpersonen: Angabe des Dienstgrades'),
- new CensusColumnNull($this, 'Kriegsgefangener', 'Angabe ob Kriegsgefangener'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfDeutschlandNL1867.php b/sources/app/Census/CensusOfDeutschlandNL1867.php
deleted file mode 100644
index 11fe43d..0000000
--- a/sources/app/Census/CensusOfDeutschlandNL1867.php
+++ /dev/null
@@ -1,67 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfDeutschlandNL1867 extends CensusOfDeutschland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '03 DEC 1867';
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Mecklenburg-Schwerin (Nachtragsliste), Deutschland';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, '1.Nr.', 'Ordnungs-Nummer.'),
- new CensusColumnGivenNames($this, '2.Vorname', 'I. Vor- und Familienname jeder Person. Vorname.'),
- new CensusColumnSurname($this, '3.Familienname', 'I. Vor- und Familienname jeder Person. Familienname.'),
- new CensusColumnNull($this, '4.männlich', 'II. Geschlecht männlich.'),
- new CensusColumnNull($this, '5.weiblich', 'II. Geschlecht weiblich.'),
- new CensusColumnBirthYear($this, '6.Geburtsjahr', 'III. Alter.'),
- new CensusColumnReligion($this, '7.Religion', 'IV. Religionsbekenntnis.'),
- new CensusColumnNull($this, '8.ledig', 'V. Familienstand. ledig.'),
- new CensusColumnNull($this, '9.verehelicht', 'V. Familienstand. verehelicht.'),
- new CensusColumnNull($this, '10.verwittwet', 'V. Familienstand. verwittwet.'),
- new CensusColumnNull($this, '11.geschieden', 'V. Familienstand. geschieden.'),
- new CensusColumnNull($this, '12.StA_M-S', 'VI. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.'),
- new CensusColumnNull($this, '13.StA', 'VI. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?'),
- new CensusColumnNull($this, '14.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende als See- oder Flußschiffer.'),
- new CensusColumnNull($this, '15.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Land- oder Seereisen.'),
- new CensusColumnNull($this, '16.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Besuch außerhalb des Orts.'),
- new CensusColumnNull($this, '17.', 'VII. Art des Aufenthalts am Zählungsort. Ueber ein Jahr, oder in anderer Art als nach Spalte 14 bis 16 Abwesende.'),
- new CensusColumnNull($this, '18.Aufenthaltsort', 'VIII. Vermuthlicher Aufenthaltsort zur Zählungszeit.'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland.php b/sources/app/Census/CensusOfEngland.php
deleted file mode 100644
index 11a401f..0000000
--- a/sources/app/Census/CensusOfEngland.php
+++ /dev/null
@@ -1,49 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfEngland1841(),
- new CensusOfEngland1851(),
- new CensusOfEngland1861(),
- new CensusOfEngland1871(),
- new CensusOfEngland1881(),
- new CensusOfEngland1891(),
- new CensusOfEngland1901(),
- new CensusOfEngland1911(),
- new RegisterOfEngland1939(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'England';
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1841.php b/sources/app/Census/CensusOfEngland1841.php
deleted file mode 100644
index 33d8639..0000000
--- a/sources/app/Census/CensusOfEngland1841.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1841 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '06 JUN 1841';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale5Years($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, employment or of independent means'),
- new CensusColumnNull($this, 'BiC', 'Born in same county'),
- new CensusColumnBornForeignParts($this, 'SIF', 'Born in Scotland, Ireland or foreign parts'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1851.php b/sources/app/Census/CensusOfEngland1851.php
deleted file mode 100644
index 0ce4468..0000000
--- a/sources/app/Census/CensusOfEngland1851.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1851 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '30 MAR 1851';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1861.php b/sources/app/Census/CensusOfEngland1861.php
deleted file mode 100644
index 1b8e715..0000000
--- a/sources/app/Census/CensusOfEngland1861.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1861 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '07 APR 1861';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1871.php b/sources/app/Census/CensusOfEngland1871.php
deleted file mode 100644
index bfede57..0000000
--- a/sources/app/Census/CensusOfEngland1871.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1871 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1871';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1881.php b/sources/app/Census/CensusOfEngland1881.php
deleted file mode 100644
index 5d418e3..0000000
--- a/sources/app/Census/CensusOfEngland1881.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1881 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '03 APR 1881';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1891.php b/sources/app/Census/CensusOfEngland1891.php
deleted file mode 100644
index b59e1a9..0000000
--- a/sources/app/Census/CensusOfEngland1891.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1891 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 APR 1891';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Empl', 'Employer'),
- new CensusColumnNull($this, 'Empd', 'Employed'),
- new CensusColumnNull($this, 'OAC', 'Own account'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic or imbecile'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1901.php b/sources/app/Census/CensusOfEngland1901.php
deleted file mode 100644
index bbaaf84..0000000
--- a/sources/app/Census/CensusOfEngland1901.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1901 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '31 MAR 1901';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfEngland1911.php b/sources/app/Census/CensusOfEngland1911.php
deleted file mode 100644
index 1151606..0000000
--- a/sources/app/Census/CensusOfEngland1911.php
+++ /dev/null
@@ -1,56 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfEngland1911 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1911';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnYearsMarried($this, 'YrM', 'Years married'),
- new CensusColumnChildrenBornAlive($this, 'ChA', 'Children born alive'),
- new CensusColumnChildrenLiving($this, 'ChL', 'Children who are still alive'),
- new CensusColumnChildrenDied($this, 'ChD', 'Children who have died'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Ind', 'Industry'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNationality($this, 'Nat', 'Nationality'),
- new CensusColumnNull($this, 'Infirm', 'Infirmity'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance.php b/sources/app/Census/CensusOfFrance.php
deleted file mode 100644
index a5ce68c..0000000
--- a/sources/app/Census/CensusOfFrance.php
+++ /dev/null
@@ -1,62 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfFrance1831(),
- new CensusOfFrance1836(),
- new CensusOfFrance1841(),
- new CensusOfFrance1846(),
- new CensusOfFrance1851(),
- new CensusOfFrance1856(),
- new CensusOfFrance1861(),
- new CensusOfFrance1866(),
- new CensusOfFrance1872(),
- new CensusOfFrance1876(),
- new CensusOfFrance1881(),
- new CensusOfFrance1886(),
- new CensusOfFrance1891(),
- new CensusOfFrance1896(),
- new CensusOfFrance1901(),
- new CensusOfFrance1906(),
- new CensusOfFrance1911(),
- new CensusOfFrance1921(),
- new CensusOfFrance1926(),
- new CensusOfFrance1931(),
- new CensusOfFrance1936(),
- new CensusOfFrance1946(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'France';
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1831.php b/sources/app/Census/CensusOfFrance1831.php
deleted file mode 100644
index 4715221..0000000
--- a/sources/app/Census/CensusOfFrance1831.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1831 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '20 JAN 1831';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1836.php b/sources/app/Census/CensusOfFrance1836.php
deleted file mode 100644
index 7d99766..0000000
--- a/sources/app/Census/CensusOfFrance1836.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1836 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '21 JAN 1836';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1841.php b/sources/app/Census/CensusOfFrance1841.php
deleted file mode 100644
index 7006c20..0000000
--- a/sources/app/Census/CensusOfFrance1841.php
+++ /dev/null
@@ -1,49 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1841 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '21 JAN 1841';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1846.php b/sources/app/Census/CensusOfFrance1846.php
deleted file mode 100644
index e44a0b4..0000000
--- a/sources/app/Census/CensusOfFrance1846.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1846 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '15 JAN 1846';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1851.php b/sources/app/Census/CensusOfFrance1851.php
deleted file mode 100644
index 7e722f9..0000000
--- a/sources/app/Census/CensusOfFrance1851.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1851 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '16 JAN 1851';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Professions', ''),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', 'Âge'),
- new CensusColumnNull($this, 'Fr', 'Français d’origine'),
- new CensusColumnNull($this, 'Nat', 'Naturalisés français'),
- new CensusColumnNull($this, 'Etr', 'Étrangers (indiquer leur pays d’origine)'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1856.php b/sources/app/Census/CensusOfFrance1856.php
deleted file mode 100644
index ab9c92e..0000000
--- a/sources/app/Census/CensusOfFrance1856.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1856 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '17 JAN 1856';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1861.php b/sources/app/Census/CensusOfFrance1861.php
deleted file mode 100644
index e278cda..0000000
--- a/sources/app/Census/CensusOfFrance1861.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1861 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '17 JAN 1861';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1866.php b/sources/app/Census/CensusOfFrance1866.php
deleted file mode 100644
index 39a8856..0000000
--- a/sources/app/Census/CensusOfFrance1866.php
+++ /dev/null
@@ -1,50 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1866 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '18 JAN 1866';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1872.php b/sources/app/Census/CensusOfFrance1872.php
deleted file mode 100644
index 0672a72..0000000
--- a/sources/app/Census/CensusOfFrance1872.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1872 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '18 JAN 1872';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnBirthPlace($this, 'Nationalité', 'Nationalité - Lieu de naissance'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1876.php b/sources/app/Census/CensusOfFrance1876.php
deleted file mode 100644
index ba1495b..0000000
--- a/sources/app/Census/CensusOfFrance1876.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1876 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '20 JAN 1876';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'),
- new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''),
- new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'),
- new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''),
- new CensusColumnConditionFrenchFille($this, 'Filles', ''),
- new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'),
- new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnBirthPlace($this, 'Nationalité', 'Nationalité - Lieu de naissance'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1881.php b/sources/app/Census/CensusOfFrance1881.php
deleted file mode 100644
index 2915177..0000000
--- a/sources/app/Census/CensusOfFrance1881.php
+++ /dev/null
@@ -1,45 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1881 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '20 JAN 1881';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1886.php b/sources/app/Census/CensusOfFrance1886.php
deleted file mode 100644
index ea9fdec..0000000
--- a/sources/app/Census/CensusOfFrance1886.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1886 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '21 JAN 1886';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1891.php b/sources/app/Census/CensusOfFrance1891.php
deleted file mode 100644
index eb9c55c..0000000
--- a/sources/app/Census/CensusOfFrance1891.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1891 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '15 JAN 1891';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1896.php b/sources/app/Census/CensusOfFrance1896.php
deleted file mode 100644
index 0f4d97c..0000000
--- a/sources/app/Census/CensusOfFrance1896.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1896 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '16 JAN 1896';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnRelationToHead($this, 'Position', 'Position dans le ménage'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1901.php b/sources/app/Census/CensusOfFrance1901.php
deleted file mode 100644
index 989f7be..0000000
--- a/sources/app/Census/CensusOfFrance1901.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1901 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '17 JAN 1901';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnAge($this, 'Âge', ''),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1906.php b/sources/app/Census/CensusOfFrance1906.php
deleted file mode 100644
index 374c999..0000000
--- a/sources/app/Census/CensusOfFrance1906.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1906 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '18 JAN 1906';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1911.php b/sources/app/Census/CensusOfFrance1911.php
deleted file mode 100644
index 5108964..0000000
--- a/sources/app/Census/CensusOfFrance1911.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1911 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '19 JAN 1911';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1921.php b/sources/app/Census/CensusOfFrance1921.php
deleted file mode 100644
index d9c6d29..0000000
--- a/sources/app/Census/CensusOfFrance1921.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1921 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '20 JAN 1921';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1926.php b/sources/app/Census/CensusOfFrance1926.php
deleted file mode 100644
index 81bc5d6..0000000
--- a/sources/app/Census/CensusOfFrance1926.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1926 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '21 JAN 1926';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1931.php b/sources/app/Census/CensusOfFrance1931.php
deleted file mode 100644
index 2c38dd7..0000000
--- a/sources/app/Census/CensusOfFrance1931.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1931 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '15 JAN 1931';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1936.php b/sources/app/Census/CensusOfFrance1936.php
deleted file mode 100644
index b455e26..0000000
--- a/sources/app/Census/CensusOfFrance1936.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1936 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '16 JAN 1936';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Noms', 'Noms de famille'),
- new CensusColumnGivenNames($this, 'Prénoms', ''),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnBirthPlace($this, 'Lieu', 'Lieu de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnRelationToHead($this, 'Situation', 'Situation par rapport au chef de ménage'),
- new CensusColumnOccupation($this, 'Profession', ''),
- new CensusColumnNull($this, 'Empl', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfFrance1946.php b/sources/app/Census/CensusOfFrance1946.php
deleted file mode 100644
index afa9693..0000000
--- a/sources/app/Census/CensusOfFrance1946.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfFrance1946 extends CensusOfFrance implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '17 JAN 1946';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurname($this, 'Nom', 'Nom de famille'),
- new CensusColumnGivenNames($this, 'Prénom', 'Prénom usuel'),
- new CensusColumnRelationToHead($this, 'Parenté', 'Parenté avec le chef de ménage ou situation dans le ménage'),
- new CensusColumnBirthYear($this, 'Année', 'Année de naissance'),
- new CensusColumnNationality($this, 'Nationalité', ''),
- new CensusColumnOccupation($this, 'Profession', ''),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland.php b/sources/app/Census/CensusOfScotland.php
deleted file mode 100644
index a18ac2c..0000000
--- a/sources/app/Census/CensusOfScotland.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfScotland1841(),
- new CensusOfScotland1851(),
- new CensusOfScotland1861(),
- new CensusOfScotland1871(),
- new CensusOfScotland1881(),
- new CensusOfScotland1891(),
- new CensusOfScotland1901(),
- new CensusOfScotland1911(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Scotland';
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1841.php b/sources/app/Census/CensusOfScotland1841.php
deleted file mode 100644
index 2e469e5..0000000
--- a/sources/app/Census/CensusOfScotland1841.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1841 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '06 JUN 1841';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale5Years($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, employment or of independent means'),
- new CensusColumnNull($this, 'BiC', 'Born in same county'),
- new CensusColumnBornForeignParts($this, 'EIF', 'Born in England, Ireland or foreign parts'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1851.php b/sources/app/Census/CensusOfScotland1851.php
deleted file mode 100644
index a0c2f24..0000000
--- a/sources/app/Census/CensusOfScotland1851.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1851 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '30 MAR 1851';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1861.php b/sources/app/Census/CensusOfScotland1861.php
deleted file mode 100644
index c942e60..0000000
--- a/sources/app/Census/CensusOfScotland1861.php
+++ /dev/null
@@ -1,49 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1861 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '07 APR 1861';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- new CensusColumnNull($this, 'School', 'Number of children between 5 and 13 attending school'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1871.php b/sources/app/Census/CensusOfScotland1871.php
deleted file mode 100644
index c562efa..0000000
--- a/sources/app/Census/CensusOfScotland1871.php
+++ /dev/null
@@ -1,49 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1871 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1871';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- new CensusColumnNull($this, 'School', 'Number of children between 5 and 13 attending school or educated at home'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1881.php b/sources/app/Census/CensusOfScotland1881.php
deleted file mode 100644
index 97b74b3..0000000
--- a/sources/app/Census/CensusOfScotland1881.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1881 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '03 APR 1881';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1891.php b/sources/app/Census/CensusOfScotland1891.php
deleted file mode 100644
index 0df25fa..0000000
--- a/sources/app/Census/CensusOfScotland1891.php
+++ /dev/null
@@ -1,52 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1891 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 APR 1891';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Empl', 'Employer'),
- new CensusColumnNull($this, 'Empd', 'Employed'),
- new CensusColumnNull($this, 'OAC', 'Own account'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Lang', 'Language spoken'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic or imbecile'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1901.php b/sources/app/Census/CensusOfScotland1901.php
deleted file mode 100644
index daa946e..0000000
--- a/sources/app/Census/CensusOfScotland1901.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1901 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '31 MAR 1901';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Lang', 'Language spoken'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfScotland1911.php b/sources/app/Census/CensusOfScotland1911.php
deleted file mode 100644
index 56f6252..0000000
--- a/sources/app/Census/CensusOfScotland1911.php
+++ /dev/null
@@ -1,57 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfScotland1911 extends CensusOfScotland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1911';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnNull($this, 'Lang', 'Language spoken'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnYearsMarried($this, 'YrM', 'Years married'),
- new CensusColumnChildrenBornAlive($this, 'ChA', 'Children born alive'),
- new CensusColumnChildrenLiving($this, 'ChL', 'Children who are still alive'),
- new CensusColumnChildrenDied($this, 'ChD', 'Children who have died'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Ind', 'Industry'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNationality($this, 'Nat', 'Nationality'),
- new CensusColumnNull($this, 'Infirm', 'Infirmity'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates.php b/sources/app/Census/CensusOfUnitedStates.php
deleted file mode 100644
index e91349a..0000000
--- a/sources/app/Census/CensusOfUnitedStates.php
+++ /dev/null
@@ -1,56 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfUnitedStates1790(),
- new CensusOfUnitedStates1800(),
- new CensusOfUnitedStates1810(),
- new CensusOfUnitedStates1820(),
- new CensusOfUnitedStates1830(),
- new CensusOfUnitedStates1840(),
- new CensusOfUnitedStates1850(),
- new CensusOfUnitedStates1860(),
- new CensusOfUnitedStates1870(),
- new CensusOfUnitedStates1880(),
- new CensusOfUnitedStates1890(),
- new CensusOfUnitedStates1900(),
- new CensusOfUnitedStates1910(),
- new CensusOfUnitedStates1920(),
- new CensusOfUnitedStates1930(),
- new CensusOfUnitedStates1940(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'United States';
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1790.php b/sources/app/Census/CensusOfUnitedStates1790.php
deleted file mode 100644
index dacb97e..0000000
--- a/sources/app/Census/CensusOfUnitedStates1790.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1790 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 AUG 1790';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnOccupation($this, 'Occupation', 'Professions and occupation'),
- new CensusColumnNull($this, 'White male 16+', 'White male of 16 yrs upward'),
- new CensusColumnNull($this, 'White male 0-16', 'White males of under 16 yrs'),
- new CensusColumnNull($this, 'White female', 'All White Females'),
- new CensusColumnNull($this, 'Free', 'All other free persons'),
- new CensusColumnNull($this, 'Slaves', 'Number of slaves'),
- new CensusColumnNull($this, 'Total', 'Total'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1800.php b/sources/app/Census/CensusOfUnitedStates1800.php
deleted file mode 100644
index fba87aa..0000000
--- a/sources/app/Census/CensusOfUnitedStates1800.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1800 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '04 AUG 1800';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
- new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
- new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'),
- new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'),
- new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'),
- new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'),
- new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'),
- new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'),
- new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'),
- new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'),
- new CensusColumnNull($this, 'Free', 'All other free persons, except Indians not taxed'),
- new CensusColumnNull($this, 'Slaves', 'Number of slaves'),
- new CensusColumnNull($this, 'Total', 'Total number of individuals'),
-
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1810.php b/sources/app/Census/CensusOfUnitedStates1810.php
deleted file mode 100644
index 45336c8..0000000
--- a/sources/app/Census/CensusOfUnitedStates1810.php
+++ /dev/null
@@ -1,55 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1810 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '06 AUG 1810';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
- new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
- new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'),
- new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'),
- new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'),
- new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'),
- new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'),
- new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'),
- new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'),
- new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'),
- new CensusColumnNull($this, 'Free', 'All other free persons, except Indians not taxed'),
- new CensusColumnNull($this, 'Slaves', 'Number of slaves'),
- new CensusColumnNull($this, 'Total', 'Total number of individuals'),
-
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1820.php b/sources/app/Census/CensusOfUnitedStates1820.php
deleted file mode 100644
index 37dc3ef..0000000
--- a/sources/app/Census/CensusOfUnitedStates1820.php
+++ /dev/null
@@ -1,73 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1820 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '07 AUG 1820';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
-
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
- new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
- new CensusColumnNull($this, 'M16-18', 'Free white males 16-18 years'),
- new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'),
- new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'),
- new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'),
- new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'),
- new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'),
- new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'),
- new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'),
- new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'),
- new CensusColumnNull($this, 'FNR', 'Foreigners not naturalized'),
- new CensusColumnNull($this, 'AG', 'No. engaged in agriculture'),
- new CensusColumnNull($this, 'COM', 'No. engaged in commerce'),
- new CensusColumnNull($this, 'MNF', 'No. engaged in manufactures'),
- new CensusColumnNull($this, 'M0', 'Slave males 0-14 years'),
- new CensusColumnNull($this, 'M14', 'Slave males 14-26 years'),
- new CensusColumnNull($this, 'M26', 'Slave males 26-45 years'),
- new CensusColumnNull($this, 'M45', 'Slave males 45+ years'),
- new CensusColumnNull($this, 'F0', 'Slave females 0-14 years'),
- new CensusColumnNull($this, 'F14', 'Slave females 14-26 years'),
- new CensusColumnNull($this, 'F26', 'Slave females 26-45 years'),
- new CensusColumnNull($this, 'F45', 'Slave females 45+ years'),
- new CensusColumnNull($this, 'M0', 'Free colored males 0-14 years'),
- new CensusColumnNull($this, 'M14', 'Free colored males 14-26 years'),
- new CensusColumnNull($this, 'M26', 'Free colored males 26-45 years'),
- new CensusColumnNull($this, 'M45', 'Free colored males 45+ years'),
- new CensusColumnNull($this, 'F0', 'Free colored females 0-14 years'),
- new CensusColumnNull($this, 'F14', 'Free colored females 14-26 years'),
- new CensusColumnNull($this, 'F26', 'Free colored females 26-45 years'),
- new CensusColumnNull($this, 'F45', 'Free colored females 45+ years'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1830.php b/sources/app/Census/CensusOfUnitedStates1830.php
deleted file mode 100644
index 52db5ec..0000000
--- a/sources/app/Census/CensusOfUnitedStates1830.php
+++ /dev/null
@@ -1,91 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1830 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 JUN 1830';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnNull($this, 'M0', 'Free white males 0-5 years'),
- new CensusColumnNull($this, 'M5', 'Free white males 5-10 years'),
- new CensusColumnNull($this, 'M10', 'Free white males 10-15 years'),
- new CensusColumnNull($this, 'M15', 'Free white males 15-20 years'),
- new CensusColumnNull($this, 'M20', 'Free white males 20-30 years'),
- new CensusColumnNull($this, 'M30', 'Free white males 30-40 years'),
- new CensusColumnNull($this, 'M40', 'Free white males 40-50 years'),
- new CensusColumnNull($this, 'M50', 'Free white males 50-60 years'),
- new CensusColumnNull($this, 'M60', 'Free white males 60-70 years'),
- new CensusColumnNull($this, 'M70', 'Free white males 70-80 years'),
- new CensusColumnNull($this, 'M80', 'Free white males 80-90 years'),
- new CensusColumnNull($this, 'M90', 'Free white males 90-100 years'),
- new CensusColumnNull($this, 'M100', 'Free white males 100+ years'),
- new CensusColumnNull($this, 'F0', 'Free white females 0-5 years'),
- new CensusColumnNull($this, 'F5', 'Free white females 5-10 years'),
- new CensusColumnNull($this, 'F10', 'Free white females 10-15 years'),
- new CensusColumnNull($this, 'F15', 'Free white females 15-20 years'),
- new CensusColumnNull($this, 'F20', 'Free white females 20-30 years'),
- new CensusColumnNull($this, 'F30', 'Free white females 30-40 years'),
- new CensusColumnNull($this, 'F40', 'Free white females 40-50 years'),
- new CensusColumnNull($this, 'F50', 'Free white females 50-60 years'),
- new CensusColumnNull($this, 'F60', 'Free white females 60-70 years'),
- new CensusColumnNull($this, 'F70', 'Free white females 70-80 years'),
- new CensusColumnNull($this, 'F80', 'Free white females 80-90 years'),
- new CensusColumnNull($this, 'F90', 'Free white females 90-100 years'),
- new CensusColumnNull($this, 'F100', 'Free white females 100+ years'),
- new CensusColumnNull($this, 'M0', 'Slave males 0-10 years'),
- new CensusColumnNull($this, 'M10', 'Slave males 10-24 years'),
- new CensusColumnNull($this, 'M24', 'Slave males 24-36 years'),
- new CensusColumnNull($this, 'M36', 'Slave males 36-55 years'),
- new CensusColumnNull($this, 'M55', 'Slave males 55-100 years'),
- new CensusColumnNull($this, 'M100', 'Slave males 100+ years'),
- new CensusColumnNull($this, 'F0', 'Slave females 0-10 years'),
- new CensusColumnNull($this, 'F10', 'Slave females 10-24 years'),
- new CensusColumnNull($this, 'F24', 'Slave females 24-36 years'),
- new CensusColumnNull($this, 'F36', 'Slave females 36-55 years'),
- new CensusColumnNull($this, 'F55', 'Slave females 55-100 years'),
- new CensusColumnNull($this, 'F100', 'Slave females 100+ years'),
- new CensusColumnNull($this, 'M0', 'Free colored males 0-10 years'),
- new CensusColumnNull($this, 'M10', 'Free colored males 10-24 years'),
- new CensusColumnNull($this, 'M24', 'Free colored males 24-36 years'),
- new CensusColumnNull($this, 'M36', 'Free colored males 36-55 years'),
- new CensusColumnNull($this, 'M55', 'Free colored males 55-100 years'),
- new CensusColumnNull($this, 'M100', 'Free colored males 100+ years'),
- new CensusColumnNull($this, 'F0', 'Free colored females 0-10 years'),
- new CensusColumnNull($this, 'F10', 'Free colored females 10-24 years'),
- new CensusColumnNull($this, 'F24', 'Free colored females 24-36 years'),
- new CensusColumnNull($this, 'F36', 'Free colored females 36-55 years'),
- new CensusColumnNull($this, 'F55', 'Free colored females 55-100 years'),
- new CensusColumnNull($this, 'F100', 'Free colored females 100+ years'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1840.php b/sources/app/Census/CensusOfUnitedStates1840.php
deleted file mode 100644
index 1e6baac..0000000
--- a/sources/app/Census/CensusOfUnitedStates1840.php
+++ /dev/null
@@ -1,80 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1840 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 JUN 1840';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
-
- new CensusColumnFullName($this, 'Name', 'Name of head of family'),
- new CensusColumnNull($this, 'M0', 'Free white males 0-5 years'),
- new CensusColumnNull($this, 'M5', 'Free white males 5-10 years'),
- new CensusColumnNull($this, 'M10', 'Free white males 10-15 years'),
- new CensusColumnNull($this, 'M15', 'Free white males 15-20 years'),
- new CensusColumnNull($this, 'M20', 'Free white males 20-30 years'),
- new CensusColumnNull($this, 'M30', 'Free white males 30-40 years'),
- new CensusColumnNull($this, 'M40', 'Free white males 40-50 years'),
- new CensusColumnNull($this, 'M50', 'Free white males 50-60 years'),
- new CensusColumnNull($this, 'M60', 'Free white males 60-70 years'),
- new CensusColumnNull($this, 'M70', 'Free white males 70-80 years'),
- new CensusColumnNull($this, 'M80', 'Free white males 80-90 years'),
- new CensusColumnNull($this, 'M90', 'Free white males 90-100 years'),
- new CensusColumnNull($this, 'M100', 'Free white males 100+ years'),
- new CensusColumnNull($this, 'F0', 'Free white females 0-5 years'),
- new CensusColumnNull($this, 'F5', 'Free white females 5-10 years'),
- new CensusColumnNull($this, 'F10', 'Free white females 10-15 years'),
- new CensusColumnNull($this, 'F15', 'Free white females 15-20 years'),
- new CensusColumnNull($this, 'F20', 'Free white females 20-30 years'),
- new CensusColumnNull($this, 'F30', 'Free white females 30-40 years'),
- new CensusColumnNull($this, 'F40', 'Free white females 40-50 years'),
- new CensusColumnNull($this, 'F50', 'Free white females 50-60 years'),
- new CensusColumnNull($this, 'F60', 'Free white females 60-70 years'),
- new CensusColumnNull($this, 'F70', 'Free white females 70-80 years'),
- new CensusColumnNull($this, 'F80', 'Free white females 80-90 years'),
- new CensusColumnNull($this, 'F90', 'Free white females 90-100 years'),
- new CensusColumnNull($this, 'F100', 'Free white females 100+ years'),
- new CensusColumnNull($this, 'M0', 'Free colored males 0-10 years'),
- new CensusColumnNull($this, 'M10', 'Free colored males 10-24 years'),
- new CensusColumnNull($this, 'M24', 'Free colored males 24-36 years'),
- new CensusColumnNull($this, 'M36', 'Free colored males 36-55 years'),
- new CensusColumnNull($this, 'M55', 'Free colored males 55-100 years'),
- new CensusColumnNull($this, 'M100', 'Free colored males 100+ years'),
- new CensusColumnNull($this, 'F0', 'Free colored females 0-10 years'),
- new CensusColumnNull($this, 'F10', 'Free colored females 10-24 years'),
- new CensusColumnNull($this, 'F24', 'Free colored females 24-36 years'),
- new CensusColumnNull($this, 'F36', 'Free colored females 36-55 years'),
- new CensusColumnNull($this, 'F55', 'Free colored females 55-100 years'),
- new CensusColumnNull($this, 'F100', 'Free colored females 100+ years'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1850.php b/sources/app/Census/CensusOfUnitedStates1850.php
deleted file mode 100644
index 3f0c0a4..0000000
--- a/sources/app/Census/CensusOfUnitedStates1850.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1850 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 JUN 1850';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAge($this, 'Age', 'Age'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Color', 'White, black, or mulatto'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
- new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
- new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
- new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'),
- new CensusColumnNull($this, 'School', 'Attended school within the year'),
- new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1860.php b/sources/app/Census/CensusOfUnitedStates1860.php
deleted file mode 100644
index ad476f3..0000000
--- a/sources/app/Census/CensusOfUnitedStates1860.php
+++ /dev/null
@@ -1,52 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1860 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'BET JUN 1860 AND OCT 1860';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAge($this, 'Age', 'Age'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Color', 'White, black, or mulatto'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
- new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
- new CensusColumnNull($this, 'PE', 'Value of personal estate owned'),
- new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
- new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'),
- new CensusColumnNull($this, 'School', 'Attended school within the year'),
- new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1870.php b/sources/app/Census/CensusOfUnitedStates1870.php
deleted file mode 100644
index d69de2e..0000000
--- a/sources/app/Census/CensusOfUnitedStates1870.php
+++ /dev/null
@@ -1,58 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1870 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'JUN 1870';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAge($this, 'Age', 'Age'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Color', 'White, Black, Mulatto, Chinese, Indian'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
- new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
- new CensusColumnNull($this, 'PE', 'Value of personal estate owned'),
- new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
- new CensusColumnFatherForeign($this, 'FFB', 'Father of foreign birth'),
- new CensusColumnMotherForeign($this, 'MFB', 'Mother of foreign birth'),
- new CensusColumnMonthIfBornWithinYear($this, 'Born', 'If born within the year, state month'),
- new CensusColumnMonthIfMarriedWithinYear($this, 'Mar', 'If married within the year, state month'),
- new CensusColumnNull($this, 'School', 'Attended school within the year'),
- new CensusColumnNull($this, 'Read', 'Cannot read'),
- new CensusColumnNull($this, 'Write', 'Cannot write'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, or idiotic'),
- new CensusColumnNull($this, 'Cit', 'Male citizen of US'),
- new CensusColumnNull($this, 'Dis', 'Male citizen of US, where right to vote is denied or abridged'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1880.php b/sources/app/Census/CensusOfUnitedStates1880.php
deleted file mode 100644
index 003e9ec..0000000
--- a/sources/app/Census/CensusOfUnitedStates1880.php
+++ /dev/null
@@ -1,63 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1880 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'JUN 1880';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAge($this, 'Age', 'Age'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnMonthIfBornWithinYear($this, 'Mon', 'If born within the year, state month'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnNull($this, 'S', 'Single'),
- new CensusColumnNull($this, 'M', 'Married'),
- new CensusColumnNull($this, 'W/D', 'Widowed, Divorced'),
- new CensusColumnMarriedWithinYear($this, 'MY', 'Married during census year'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
- new CensusColumnNull($this, 'UnEm', 'Number of months the person has been unemployed during the census year'),
- new CensusColumnNull($this, 'Sick', 'Sickness or disability'),
- new CensusColumnNull($this, 'Blind', 'Blind'),
- new CensusColumnNull($this, 'DD', 'Deaf and dumb'),
- new CensusColumnNull($this, 'Idiotic', 'Idiotic'),
- new CensusColumnNull($this, 'Insane', 'Insane'),
- new CensusColumnNull($this, 'Disabled', 'Maimed, crippled, bedridden or otherwise disabled'),
- new CensusColumnNull($this, 'School', 'Attended school within the census year'),
- new CensusColumnNull($this, 'Read', 'Cannot read'),
- new CensusColumnNull($this, 'Write', 'Cannot write'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth, naming the state, territory, or country'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father, naming the state, territory, or country'),
- new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother, naming the state, territory, or country'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1890.php b/sources/app/Census/CensusOfUnitedStates1890.php
deleted file mode 100644
index 1353add..0000000
--- a/sources/app/Census/CensusOfUnitedStates1890.php
+++ /dev/null
@@ -1,64 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1890 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 JUN 1890';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnGivenNameInitial($this, 'Name', 'Christian name in full, and initial of middle name'),
- new CensusColumnSurname($this, 'Surname', 'Surname'),
- new CensusColumnNull($this, 'CW', 'Whether a soldier, sailor or marine during the civil war (U.S. or Conf.), or widow of such person'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of family'),
- new CensusColumnNull($this, 'Race', 'Whether white, black, mulatto, quadroon, octoroon, Chinese, Japanese, or Indian'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnAge($this, 'Age', 'Age at nearest birthday. If under one year, give age in months'),
- new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
- new CensusColumnMonthIfMarriedWithinYear($this, 'Mar', 'Whether married duirng the census year (June 1, 1889, to May 31, 1890)'),
- new CensusColumnNull($this, 'Chil', 'Mother of how many children, and number of these children living'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father'),
- new CensusColumnFatherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother'),
- new CensusColumnNull($this, 'US', 'Number of years in the United States'),
- new CensusColumnNull($this, 'Nat', 'Whether naturalized'),
- new CensusColumnNull($this, 'Papers', 'Whether naturalization papers have been taken out'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, occupation'),
- new CensusColumnNull($this, 'Unemp', 'Months unemployed during the census year (June 1, 1889, to May 31, 1890)'),
- new CensusColumnNull($this, 'Read', 'Able to read'),
- new CensusColumnNull($this, 'Write', 'Able to write'),
- new CensusColumnNull($this, 'Eng', 'Able to speak English. If not the language or dialect spoken'),
- new CensusColumnNull($this, 'Disease', 'Whether suffering from acute or chronic disease, with name of disease and length of time afflicted'),
- new CensusColumnNull($this, 'Infirm', 'Whether defective in mind, sight, hearing, or speech, or whether crippled, maimed, or deformed, with name of defect'),
- new CensusColumnNull($this, 'Prisoner', 'Whether a prisoner, convict, homeless child, or pauper'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1900.php b/sources/app/Census/CensusOfUnitedStates1900.php
deleted file mode 100644
index 6af9544..0000000
--- a/sources/app/Census/CensusOfUnitedStates1900.php
+++ /dev/null
@@ -1,66 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1900 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '01 JUN 1900';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
- new CensusColumnNull($this, 'Race', 'Color or race'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnBirthMonth($this, 'Month', 'Month of birth'),
- new CensusColumnBirthYear($this, 'Year', 'Year of birth'),
- new CensusColumnAge($this, 'Age', 'Age at last birthday'),
- new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
- new CensusColumnYearsMarried($this, 'Marr', 'Number of years married'),
- new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'),
- new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'),
- new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'),
- new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
- new CensusColumnNull($this, 'US', 'Number of years in the United States'),
- new CensusColumnNull($this, 'Nat', 'Naturalization'),
- new CensusColumnOccupation($this, 'Occupation', 'Occupation, trade of profession'),
- new CensusColumnNull($this, 'Unemp', 'Months not unemployed'),
- new CensusColumnNull($this, 'School', 'Attended school (in months)'),
- new CensusColumnNull($this, 'Read', 'Can read'),
- new CensusColumnNull($this, 'Write', 'Can write'),
- new CensusColumnNull($this, 'Eng', 'Can speak English'),
- new CensusColumnNull($this, 'Home', 'Owned or rented'),
- new CensusColumnNull($this, 'Mort', 'Owned free or mortgaged'),
- new CensusColumnNull($this, 'Farm', 'Farm or house'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1910.php b/sources/app/Census/CensusOfUnitedStates1910.php
deleted file mode 100644
index 779b209..0000000
--- a/sources/app/Census/CensusOfUnitedStates1910.php
+++ /dev/null
@@ -1,69 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1910 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '15 APR 1910';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Race', 'Color or race'),
- new CensusColumnAge($this, 'Age', 'Age at last birthday'),
- new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
- new CensusColumnYearsMarried($this, 'Marr', 'Number of years of present marriage'),
- new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'),
- new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'),
- new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'),
- new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
- new CensusColumnNull($this, 'Nat', 'Whether naturalized or alien'),
- new CensusColumnNull($this, 'Lang', 'Whether able to speak English, of if not, give language spoken'),
- new CensusColumnOccupation($this, 'Occupation', 'Trade or profession of, or particular kind of work done by this person'),
- new CensusColumnNull($this, 'Ind', 'General nature of industry'),
- new CensusColumnNull($this, 'Emp', 'Whether an employer, employee, or work on own account'),
- new CensusColumnNull($this, 'Unemp', 'Whether out of work on April 15, 1910'),
- new CensusColumnNull($this, 'Unemp', 'Number of weeks out of work in 1909'),
- new CensusColumnNull($this, 'R', 'Whether able to read'),
- new CensusColumnNull($this, 'W', 'Whether able to write'),
- new CensusColumnNull($this, 'Sch', 'Attended school since September 1, 1909'),
- new CensusColumnNull($this, 'Home', 'Owned or rented'),
- new CensusColumnNull($this, 'Mort', 'Owned free or mortgaged'),
- new CensusColumnNull($this, 'Farm', 'Farm or house'),
- new CensusColumnNull($this, 'CW', 'Whether a survivor of the Union or Confederate Army or Navy'),
- new CensusColumnNull($this, 'Blind', 'Whether blind (both eyes)'),
- new CensusColumnNull($this, 'Deaf', 'Whether deaf and dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1920.php b/sources/app/Census/CensusOfUnitedStates1920.php
deleted file mode 100644
index 5db1f9f..0000000
--- a/sources/app/Census/CensusOfUnitedStates1920.php
+++ /dev/null
@@ -1,64 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1920 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'JAN 1920';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
- new CensusColumnNull($this, 'Home', 'Owned or rented'),
- new CensusColumnNull($this, 'Mort', 'If owned, free or mortgaged'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Race', 'Color or race'),
- new CensusColumnAge($this, 'Age', 'Age at last birthday'),
- new CensusColumnConditionUs($this, 'Condition', 'Whether single, married, widowed, or divorced'),
- new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
- new CensusColumnNull($this, 'Nat', 'Naturalized or alien'),
- new CensusColumnNull($this, 'NatY', 'If naturalized, year of naturalization'),
- new CensusColumnNull($this, 'School', 'Attended school since Sept. 1, 1919'),
- new CensusColumnNull($this, 'R', 'Whether able to read'),
- new CensusColumnNull($this, 'W', 'Whether able to write'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth'),
- new CensusColumnNull($this, 'Lang', 'Mother tongue'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father'),
- new CensusColumnNull($this, 'Father lang', 'Mother tongue of father'),
- new CensusColumnFatherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother'),
- new CensusColumnNull($this, 'Mother lang', 'Mother tongue of mother'),
- new CensusColumnNull($this, 'Eng', 'Whether able to speak English'),
- new CensusColumnOccupation($this, 'Occupation', 'Trade, profession, or particular kind of work done'),
- new CensusColumnNull($this, 'Ind', 'Industry, business of establishment in which at work'),
- new CensusColumnNull($this, 'Emp', 'Employer, salary or wage worker, or work on own account'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1930.php b/sources/app/Census/CensusOfUnitedStates1930.php
deleted file mode 100644
index a836a84..0000000
--- a/sources/app/Census/CensusOfUnitedStates1930.php
+++ /dev/null
@@ -1,68 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1930 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'APR 1930';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
- new CensusColumnNull($this, 'Home', 'Home owned or rented'),
- new CensusColumnNull($this, 'V/R', 'Value of house, if owned, or monthly rental if rented'),
- new CensusColumnNull($this, 'Radio', 'Radio set'),
- new CensusColumnNull($this, 'Farm', 'Does this family live on a farm'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Race', 'Color or race'),
- new CensusColumnAge($this, 'Age', 'Age at last birthday'),
- new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
- new CensusColumnAgeMarried($this, 'AM', 'Age at first marriage'),
- new CensusColumnNull($this, 'School', 'Attended school since Sept. 1, 1929'),
- new CensusColumnNull($this, 'R/W', 'Whether able to read and write'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father'),
- new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother'),
- new CensusColumnNull($this, 'Lang', 'Language spoken in home before coming to the United States'),
- new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
- new CensusColumnNull($this, 'Nat', 'Naturalization'),
- new CensusColumnNull($this, 'Eng', 'Whether able to speak English'),
- new CensusColumnOccupation($this, 'Occupation', 'Trade, profession, or particular kind of work done'),
- new CensusColumnNull($this, 'Industry', 'Industry, business of establishment in which at work'),
- new CensusColumnNull($this, 'Code', 'Industry code'),
- new CensusColumnNull($this, 'Emp', 'Class of worker'),
- new CensusColumnNull($this, 'Work', 'Whether normally at work yesterday or the last regular working day'),
- new CensusColumnNull($this, 'Unemp', 'If not, …'),
- new CensusColumnNull($this, 'Vet', 'Whether a veteran of U.S. military or …'),
- new CensusColumnNull($this, 'War', 'What war or …'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfUnitedStates1940.php b/sources/app/Census/CensusOfUnitedStates1940.php
deleted file mode 100644
index eee6d17..0000000
--- a/sources/app/Census/CensusOfUnitedStates1940.php
+++ /dev/null
@@ -1,67 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfUnitedStates1940 extends CensusOfUnitedStates implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return 'APR 1940';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
- new CensusColumnNull($this, 'Home', 'Home owned or rented'),
- new CensusColumnNull($this, 'V/R', 'Value of house, if owned, or monthly rental if rented'),
- new CensusColumnNull($this, 'Farm', 'Does this family live on a farm'),
- new CensusColumnSexMF($this, 'Sex', 'Sex'),
- new CensusColumnNull($this, 'Race', 'Color or race'),
- new CensusColumnAge($this, 'Age', 'Age at last birthday'),
- new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
- new CensusColumnAgeMarried($this, 'AM', 'Age at first marriage'),
- new CensusColumnNull($this, 'School', 'Attended school since Sept. 1, 1929'),
- new CensusColumnNull($this, 'R/W', 'Whether able to read and write'),
- new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth'),
- new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father'),
- new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother'),
- new CensusColumnNull($this, 'Lang', 'Language spoken in home before coming to the United States'),
- new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
- new CensusColumnNull($this, 'Nat', 'Naturalization'),
- new CensusColumnNull($this, 'Eng', 'Whether able to speak English'),
- new CensusColumnOccupation($this, 'Occupation', 'Trade, profession, or particular kind of work done'),
- new CensusColumnNull($this, 'Industry', 'Industry, business of establishment in which at work'),
- new CensusColumnNull($this, 'Code', 'Industry code'),
- new CensusColumnNull($this, 'Emp', 'Class of worker'),
- new CensusColumnNull($this, 'Work', 'Whether normally at work yesterday or the last regular working day'),
- new CensusColumnNull($this, 'Unemp', 'If not, …'),
- new CensusColumnNull($this, 'Vet', 'Whether a veteran of U.S. military or …'),
- new CensusColumnNull($this, 'War', 'What war or …'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales.php b/sources/app/Census/CensusOfWales.php
deleted file mode 100644
index 90aa4cb..0000000
--- a/sources/app/Census/CensusOfWales.php
+++ /dev/null
@@ -1,49 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales extends Census implements CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates() {
- return array(
- new CensusOfWales1841(),
- new CensusOfWales1851(),
- new CensusOfWales1861(),
- new CensusOfWales1871(),
- new CensusOfWales1881(),
- new CensusOfWales1891(),
- new CensusOfWales1901(),
- new CensusOfWales1911(),
- new RegisterOfWales1939(),
- );
- }
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace() {
- return 'Wales';
- }
-}
diff --git a/sources/app/Census/CensusOfWales1841.php b/sources/app/Census/CensusOfWales1841.php
deleted file mode 100644
index 8f1d5c4..0000000
--- a/sources/app/Census/CensusOfWales1841.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1841 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '06 JUN 1841';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name'),
- new CensusColumnAgeMale5Years($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale5Years($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Profession, trade, employment or of independent means'),
- new CensusColumnNull($this, 'BiC', 'Born in same county'),
- new CensusColumnBornForeignParts($this, 'SIF', 'Born in Scotland, Ireland or foreign parts'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1851.php b/sources/app/Census/CensusOfWales1851.php
deleted file mode 100644
index 79c41a9..0000000
--- a/sources/app/Census/CensusOfWales1851.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1851 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '30 MAR 1851';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1861.php b/sources/app/Census/CensusOfWales1861.php
deleted file mode 100644
index c5c4bc4..0000000
--- a/sources/app/Census/CensusOfWales1861.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1861 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '07 APR 1861';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1871.php b/sources/app/Census/CensusOfWales1871.php
deleted file mode 100644
index fc2ce9e..0000000
--- a/sources/app/Census/CensusOfWales1871.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1871 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1871';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1881.php b/sources/app/Census/CensusOfWales1881.php
deleted file mode 100644
index b4fe958..0000000
--- a/sources/app/Census/CensusOfWales1881.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1881 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '03 APR 1881';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1891.php b/sources/app/Census/CensusOfWales1891.php
deleted file mode 100644
index 267bf88..0000000
--- a/sources/app/Census/CensusOfWales1891.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1891 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '05 APR 1891';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Empl', 'Employer'),
- new CensusColumnNull($this, 'Empd', 'Employed'),
- new CensusColumnNull($this, 'OAC', 'Own account'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic or imbecile'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1901.php b/sources/app/Census/CensusOfWales1901.php
deleted file mode 100644
index 896cebf..0000000
--- a/sources/app/Census/CensusOfWales1901.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1901 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '31 MAR 1901';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'),
- new CensusColumnNull($this, 'Lang', 'Language spoken'),
- );
- }
-}
diff --git a/sources/app/Census/CensusOfWales1911.php b/sources/app/Census/CensusOfWales1911.php
deleted file mode 100644
index 4319783..0000000
--- a/sources/app/Census/CensusOfWales1911.php
+++ /dev/null
@@ -1,57 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class CensusOfWales1911 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '02 APR 1911';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnFullName($this, 'Name', 'Name and surname'),
- new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
- new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
- new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
- new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
- new CensusColumnYearsMarried($this, 'YrM', 'Years married'),
- new CensusColumnChildrenBornAlive($this, 'ChA', 'Children born alive'),
- new CensusColumnChildrenLiving($this, 'ChL', 'Children who are still alive'),
- new CensusColumnChildrenDied($this, 'ChD', 'Children who have died'),
- new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
- new CensusColumnNull($this, 'Ind', 'Industry'),
- new CensusColumnNull($this, 'Emp', 'Employer, worker or own account'),
- new CensusColumnNull($this, 'Home', 'Working at home'),
- new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
- new CensusColumnNationality($this, 'Nat', 'Nationality'),
- new CensusColumnNull($this, 'Infirm', 'Infirmity'),
- new CensusColumnNull($this, 'Lang', 'Language spoken'),
- );
- }
-}
diff --git a/sources/app/Census/CensusPlaceInterface.php b/sources/app/Census/CensusPlaceInterface.php
deleted file mode 100644
index d6de5e4..0000000
--- a/sources/app/Census/CensusPlaceInterface.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-interface CensusPlaceInterface {
- /**
- * All available censuses for this census place.
- *
- * @return CensusInterface[]
- */
- public function allCensusDates();
-
- /**
- * Where did this census occur, in GEDCOM format.
- *
- * @return string
- */
- public function censusPlace();
-}
diff --git a/sources/app/Census/RegisterOfEngland1939.php b/sources/app/Census/RegisterOfEngland1939.php
deleted file mode 100644
index 578c993..0000000
--- a/sources/app/Census/RegisterOfEngland1939.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class RegisterOfEngland1939 extends CensusOfEngland implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '29 SEP 1939';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, 'Schedule', 'Schedule Number'),
- new CensusColumnNull($this, 'SubNum', 'Schedule Sub Number'),
- new CensusColumnSurnameGivenNames($this, 'Name', 'Surname & other names'),
- new CensusColumnNull($this, 'Role', 'For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate'),
- new CensusColumnSexMF($this, 'Sex', 'Male or Female'),
- new CensusColumnBirthDayMonthSlashYear($this, 'DOB', 'Date of birth'),
- new CensusColumnConditionEnglish($this, 'MC', 'Marital Condition - Married, Single, Unmarried, Widowed or Divorced'),
- new CensusColumnOccupation($this, 'Occupation', 'Occupation'),
- );
- }
-}
diff --git a/sources/app/Census/RegisterOfWales1939.php b/sources/app/Census/RegisterOfWales1939.php
deleted file mode 100644
index 8152ec7..0000000
--- a/sources/app/Census/RegisterOfWales1939.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Census;
-
-/**
- * Definitions for a census
- */
-class RegisterOfWales1939 extends CensusOfWales implements CensusInterface {
- /**
- * When did this census occur.
- *
- * @return string
- */
- public function censusDate() {
- return '29 SEP 1939';
- }
-
- /**
- * The columns of the census.
- *
- * @return CensusColumnInterface[]
- */
- public function columns() {
- return array(
- new CensusColumnNull($this, 'Schedule', 'Schedule Number'),
- new CensusColumnNull($this, 'SubNum', 'Schedule Sub Number'),
- new CensusColumnSurnameGivenNames($this, 'Name', 'Surname & other names'),
- new CensusColumnNull($this, 'Role', 'For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate'),
- new CensusColumnSexMF($this, 'Sex', 'Male or Female'),
- new CensusColumnBirthDayMonthSlashYear($this, 'DOB', 'Date of birth'),
- new CensusColumnConditionEnglish($this, 'MC', 'Marital Condition - Married, Single, Unmarried, Widowed or Divorced'),
- new CensusColumnOccupation($this, 'Occupation', 'Occupation'),
- );
- }
-}
diff --git a/sources/app/ColorGenerator.php b/sources/app/ColorGenerator.php
deleted file mode 100644
index 3ad1e96..0000000
--- a/sources/app/ColorGenerator.php
+++ /dev/null
@@ -1,95 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Generate a range of colurs for the lifespan chart.
- */
-class ColorGenerator {
- /** @var int Current hue */
- private $hue;
-
- /** @var int Initial hue*/
- private $basehue;
-
- /** @var int Saturation */
- private $saturation;
-
- /** @var int Lightness */
- private $lightness;
-
- /** @var int Initial lightness*/
- private $baselightness;
-
- /** @var int Alpha transparancy */
- private $alpha;
-
- /** @var int Clockwise or anticlockwise color wheel */
- private $range;
-
- /**
- * Create a color generator.
- *
- * @param int $hue (0Deg = Red, 120Deg = green, 240Deg = blue)
- * @param int $saturation
- * @param int $lightness
- * @param int $alpha
- * @param int $range (sign determines direction. positive = clockwise, negative = anticlockwise)
- */
- public function __construct($hue, $saturation, $lightness, $alpha, $range) {
- $this->hue = $hue;
- $this->basehue = $hue;
- $this->saturation = $saturation;
- $this->lightness = $lightness;
- $this->baselightness = $lightness;
- $this->alpha = $alpha;
- $this->range = $range;
- }
-
- /**
- * Function getNextColor
- *
- * $lightness cycles between $baselightness and 100% in $lightnessStep steps
- * $hue cycles on each complete $lightness cycle
- * between $basehue and $basehue + $range degrees in $hueStep degrees
- *
- * @param int $lightnessStep
- * @param int $hueStep
- *
- * @return string
- */
- public function getNextColor($lightnessStep = 10, $hueStep = 15) {
- $lightness = $this->lightness + $lightnessStep;
- $hue = $this->hue;
-
- if ($lightness >= 100) {
- $lightness = $this->baselightness;
- $hue += $hueStep * (abs($this->range) / $this->range);
- if (($hue - $this->basehue) * ($hue - ($this->basehue + $this->range)) >= 0) {
- $hue = $this->basehue;
- }
- $this->hue = $hue;
- }
- $this->lightness = $lightness;
-
- return sprintf("hsla(%s, %s%%, %s%%, %s)",
- $this->hue,
- $this->saturation,
- $this->lightness,
- $this->alpha);
- }
-
-}
diff --git a/sources/app/Config.php b/sources/app/Config.php
deleted file mode 100644
index df78d8b..0000000
--- a/sources/app/Config.php
+++ /dev/null
@@ -1,223 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees;
-
-/**
- * Application configuration data. Data here has no GUI to edit it,
- * although most of it can be altered to customise local installations.
- */
-class Config {
- /** Font used to watermark images */
- const FONT_DEJAVU_SANS_TTF = 'packages/dejavu-fonts-ttf-2.35/ttf/DejaVuSans.ttf';
-
- /**
- * NPFX tags - name prefixes
- *
- * @return string[]
- */
- public static function namePrefixes() {
- return array(
- 'Adm', 'Amb', 'Brig', 'Can', 'Capt', 'Chan', 'Chapln', 'Cmdr', 'Col', 'Cpl',
- 'Cpt', 'Dr', 'Gen', 'Gov', 'Hon', 'Lady', 'Lt', 'Mr', 'Mrs', 'Ms', 'Msgr',
- 'Pfc', 'Pres', 'Prof', 'Pvt', 'Rabbi', 'Rep', 'Rev', 'Sen', 'Sgt', 'Sir',
- 'Sr', 'Sra', 'Srta', 'Ven',
- );
- }
-
- /**
- * FILE:FORM tags - file formats
- *
- * @return string[]
- */
- public static function fileFormats() {
- return array(
- 'avi', 'bmp', 'gif', 'jpeg', 'mp3', 'ole', 'pcx', 'png', 'tiff', 'wav',
- );
- }
-
- /**
- * Fact tags (as opposed to event tags), that don't normally have a value
- *
- * return string[]
- */
- public static function emptyFacts() {
- return array(
- 'ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI',
- 'CENS', 'CHAN', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DATA', 'DEAT',
- 'DIV', 'DIVF', 'EMIG', 'ENDL', 'ENGA', 'FCOM', 'GRAD', 'HUSB', 'IMMI',
- 'MAP', 'MARB', 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'ORDN', 'PROB',
- 'RESI', 'RETI', 'SLGC', 'SLGS', 'WIFE', 'WILL', '_HOL', '_NMR', '_NMAR',
- '_SEPR',
- );
- }
-
- /**
- * Tags that don't require a PLAC subtag
- *
- * @return string[]
- */
- public static function nonPlaceFacts() {
- return array(
- 'ENDL', 'NCHI', 'REFN', 'SLGC', 'SLGS',
- );
- }
-
- /**
- * Tags that don't require a DATE subtag
- *
- * @return string[]
- */
- public static function nonDateFacts() {
- return array(
- 'ABBR', 'ADDR', 'AFN', 'ALIA', 'AUTH', 'CHIL', 'EMAIL', 'FAX', 'FILE',
- 'HUSB', 'NAME', 'NCHI', 'NOTE', 'OBJE', 'PHON', 'PUBL', 'REFN', 'REPO',
- 'RESN', 'SEX', 'SOUR', 'SSN', 'TEXT', 'TITL', 'WIFE', 'WWW', '_EMAIL',
- );
- }
-
- /**
- * Tags that require a DATE:TIME as well as a DATE
- *
- * @return string[]
- */
- public static function dateAndTime() {
- return array(
- 'BIRT', 'DEAT',
- );
- }
-
- /**
- * Level 2 tags that apply to specific Level 1 tags
- * Tags are applied in the order they appear here.
- *
- * @return string[][]
- */
- public static function levelTwoTags() {
- return array(
- '_HEB' => array(
- 'NAME', 'TITL',
- ),
- 'ROMN' => array(
- 'NAME', 'TITL',
- ),
- 'TYPE' => array(
- 'EVEN', 'FACT', 'GRAD', 'IDNO', 'MARR', 'ORDN', 'SSN',
- ),
- 'AGNC' => array(
- 'EDUC', 'GRAD', 'OCCU', 'ORDN', 'RETI',
- ),
- 'CALN' => array(
- 'REPO',
- ),
- 'CEME' => array(// CEME is NOT a valid 5.5.1 tag
- //'BURI',
- ),
- 'RELA' => array(
- 'ASSO', '_ASSO',
- ),
- 'DATE' => array(
- 'ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI',
- 'CENS', 'CENS', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DEAT', 'DIV', 'DIVF',
- 'DSCR', 'EDUC', 'EMIG', 'ENDL', 'ENGA', 'EVEN', 'FCOM', 'GRAD', 'IMMI',
- 'MARB', 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'OCCU', 'ORDN', 'PROB',
- 'PROP', 'RELI', 'RESI', 'RETI', 'SLGC', 'SLGS', 'WILL', '_TODO',
- ),
- 'AGE' => array(
- 'CENS', 'DEAT',
- ),
- 'TEMP' => array(
- 'BAPL', 'CONL', 'ENDL', 'SLGC', 'SLGS',
- ),
- 'PLAC' => array(
- 'ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI',
- 'CENS', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DEAT', 'DIV', 'DIVF',
- 'EDUC', 'EMIG', 'ENDL', 'ENGA', 'EVEN', 'FCOM', 'GRAD', 'IMMI', 'MARB',
- 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'OCCU', 'ORDN', 'PROB', 'PROP',
- 'RELI', 'RESI', 'RETI', 'SLGC', 'SLGS', 'SSN', 'WILL',
- ),
- 'STAT' => array(
- 'BAPL', 'CONL', 'ENDL', 'SLGC', 'SLGS',
- ),
- 'ADDR' => array(
- 'BAPM', 'BIRT', 'BURI', 'CENS', 'CHR', 'CHRA', 'CONF', 'CREM', 'DEAT',
- 'EDUC', 'EVEN', 'GRAD', 'MARR', 'OCCU', 'ORDN', 'PROP', 'RESI',
- ),
- 'CAUS' => array(
- 'DEAT',
- ),
- 'PHON' => array(
- 'OCCU', 'RESI',
- ),
- 'FAX' => array(
- 'OCCU', 'RESI',
- ),
- 'WWW' => array(
- 'OCCU', 'RESI',
- ),
- 'EMAIL' => array(
- 'OCCU', 'RESI',
- ),
- 'HUSB' => array(
- 'MARR',
- ),
- 'WIFE' => array(
- 'MARR',
- ),
- 'FAMC' => array(
- 'ADOP', 'SLGC',
- ),
- 'FILE' => array(
- 'OBJE',
- ),
- '_PRIM' => array(
- 'OBJE',
- ),
- 'EVEN' => array(
- 'DATA',
- ),
- '_WT_USER' => array(
- '_TODO',
- ),
- // See https://bugs.launchpad.net/webtrees/+bug/1082666
- 'RELI' => array(
- 'CHR', 'CHRA', 'BAPM', 'MARR', 'BURI',
- ),
- );
- }
-
- /**
- * Name fields
- *
- * @return string[]
- */
- public static function standardNameFacts() {
- return array(
- 'NAME', 'NPFX', 'GIVN', 'SPFX', 'SURN', 'NSFX',
- );
- }
-
- /**
- * A list of facts/events that generally have two associates
- * (two witnesses, two godparents, etc.)
- *
- * @return string[]
- */
- public static function twoAssociates() {
- return array(
- 'CHR', 'BAPM', 'MARR',
- );
- }
-}
diff --git a/sources/app/Controller/AdvancedSearchController.php b/sources/app/Controller/AdvancedSearchController.php
deleted file mode 100644
index 7a82228..0000000
--- a/sources/app/Controller/AdvancedSearchController.php
+++ /dev/null
@@ -1,667 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Database;
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Soundex;
-
-/**
- * Controller for the advanced search page
- */
-class AdvancedSearchController extends SearchController {
- /** @var string[] Fields to search */
- public $fields = array();
-
- /** @var string[] Field values to search */
- public $values = array();
-
- /** @var int[] Range of days either side of target date */
- public $plusminus = array();
-
- /**
- * Startup activity
- */
- public function __construct() {
- parent::__construct();
-
- $this->setPageTitle(I18N::translate('Advanced search'));
-
- if (empty($_REQUEST['action'])) {
- $this->action = "advanced";
- }
- if ($this->action == "advanced") {
- if (isset($_REQUEST['fields'])) {
- $this->fields = $_REQUEST['fields'];
- ksort($this->fields);
- }
- if (isset($_REQUEST['values'])) {
- $this->values = $_REQUEST['values'];
- }
- if (isset($_REQUEST['plusminus'])) {
- $this->plusminus = $_REQUEST['plusminus'];
- }
- $this->reorderFields();
- $this->advancedSearch();
- }
- if (!$this->fields) {
- $this->fields = array(
- 'NAME:GIVN:SDX',
- 'NAME:SURN:SDX',
- 'BIRT:DATE',
- 'BIRT:PLAC',
- 'FAMS:MARR:DATE',
- 'FAMS:MARR:PLAC',
- 'DEAT:DATE',
- 'DEAT:PLAC',
- 'FAMC:HUSB:NAME:GIVN:SDX',
- 'FAMC:HUSB:NAME:SURN:SDX',
- 'FAMC:WIFE:NAME:GIVN:SDX',
- 'FAMC:WIFE:NAME:SURN:SDX',
- );
- }
- }
-
- /**
- * A list of additional fields that can be added.
- *
- * @return string[]
- */
- public function getOtherFields() {
- global $WT_TREE;
-
- $ofields = array(
- 'ADDR', 'ADDR:CITY', 'ADDR:STAE', 'ADDR:CTRY', 'ADDR:POST',
- 'ADOP:DATE', 'ADOP:PLAC',
- 'AFN',
- 'BAPL:DATE', 'BAPL:PLAC',
- 'BAPM:DATE', 'BAPM:PLAC',
- 'BARM:DATE', 'BARM:PLAC',
- 'BASM:DATE', 'BASM:PLAC',
- 'BLES:DATE', 'BLES:PLAC',
- 'BURI:DATE', 'BURI:PLAC',
- 'CAST',
- 'CENS:DATE', 'CENS:PLAC',
- 'CHAN:DATE', 'CHAN:_WT_USER',
- 'CHR:DATE', 'CHR:PLAC',
- 'CREM:DATE', 'CREM:PLAC',
- 'DSCR',
- 'EMAIL',
- 'EMIG:DATE', 'EMIG:PLAC',
- 'ENDL:DATE', 'ENDL:PLAC',
- 'EVEN', 'EVEN:TYPE', 'EVEN:DATE', 'EVEN:PLAC',
- 'FACT', 'FACT:TYPE',
- 'FAMS:CENS:DATE', 'FAMS:CENS:PLAC',
- 'FAMS:DIV:DATE',
- 'FAMS:NOTE',
- 'FAMS:SLGS:DATE', 'FAMS:SLGS:PLAC',
- 'FAX',
- 'FCOM:DATE', 'FCOM:PLAC',
- 'IMMI:DATE', 'IMMI:PLAC',
- 'NAME:NICK', 'NAME:_MARNM', 'NAME:_HEB', 'NAME:ROMN',
- 'NATI',
- 'NATU:DATE', 'NATU:PLAC',
- 'NOTE',
- 'OCCU',
- 'ORDN:DATE', 'ORDN:PLAC',
- 'REFN',
- 'RELI',
- 'RESI', 'RESI:DATE', 'RESI:PLAC',
- 'SLGC:DATE', 'SLGC:PLAC',
- 'TITL',
- '_BRTM:DATE', '_BRTM:PLAC',
- '_MILI',
- );
- // Allow (some of) the user-specified fields to be selected
- preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('INDI_FACTS_ADD'), $facts);
- foreach ($facts[1] as $fact) {
- if (
- $fact !== 'BIRT' &&
- $fact !== 'DEAT' &&
- $fact !== 'ASSO' &&
- !in_array($fact, $ofields) &&
- !in_array("{$fact}:DATE", $ofields) &&
- !in_array("{$fact}:PLAC", $ofields)
- ) {
- $ofields[] = $fact;
- }
- }
- $fields = array();
- foreach ($ofields as $field) {
- $fields[$field] = strip_tags(GedcomTag::getLabel($field)); // Custom tags have error markup
- }
- uksort($fields, '\Fisharebest\Webtrees\Controller\AdvancedSearchController::tagSort');
-
- return $fields;
- }
-
- /**
- * Compare two tags, for sorting
- *
- * @param string $x
- * @param string $y
- *
- * @return int
- */
- public static function tagSort($x, $y) {
- list($x1) = explode(':', $x . ':');
- list($y1) = explode(':', $y . ':');
- $tmp = I18N::strcasecmp(GedcomTag::getLabel($x1), GedcomTag::getLabel($y1));
- if ($tmp) {
- return $tmp;
- } else {
- return I18N::strcasecmp(GedcomTag::getLabel($x), GedcomTag::getLabel($y));
- }
- }
-
- /**
- * Get the value.
- *
- * @param int $i
- *
- * @return string
- */
- public function getValue($i) {
- $val = '';
- if (isset($this->values[$i])) {
- $val = $this->values[$i];
- }
-
- return $val;
- }
-
- /**
- * Get the field.
- *
- * @param int $i
- *
- * @return string
- */
- public function getField($i) {
- $val = '';
- if (isset($this->fields[$i])) {
- $val = htmlentities($this->fields[$i]);
- }
-
- return $val;
- }
-
- /**
- * Get the index.
- *
- * @param string $field
- *
- * @return int
- */
- public function getIndex($field) {
- return array_search($field, $this->fields);
- }
-
- /**
- * Get the label.
- *
- * @param string $tag
- *
- * @return string
- */
- public function getLabel($tag) {
- return GedcomTag::getLabel(preg_replace('/:(SDX|BEGINS|EXACT|CONTAINS)$/', '', $tag));
- }
-
- /**
- * Set the field order
- */
- private function reorderFields() {
- $i = 0;
- $newfields = array();
- $newvalues = array();
- $newplus = array();
- $rels = array();
- foreach ($this->fields as $j => $field) {
- if (strpos($this->fields[$j], "FAMC:HUSB:NAME") === 0 || strpos($this->fields[$j], "FAMC:WIFE:NAME") === 0) {
- $rels[$this->fields[$j]] = $this->values[$j];
- continue;
- }
- $newfields[$i] = $this->fields[$j];
- if (isset($this->values[$j])) {
- $newvalues[$i] = $this->values[$j];
- }
- if (isset($this->plusminus[$j])) {
- $newplus[$i] = $this->plusminus[$j];
- }
- $i++;
- }
- $this->fields = $newfields;
- $this->values = $newvalues;
- $this->plusminus = $newplus;
- foreach ($rels as $field => $value) {
- $this->fields[] = $field;
- $this->values[] = $value;
- }
- }
-
- /**
- * Perform the search
- */
- private function advancedSearch() {
- global $WT_TREE;
-
- $this->myindilist = array();
- $fct = count($this->fields);
- if (!array_filter($this->values)) {
- return;
- }
-
- // Dynamic SQL query, plus bind variables
- $sql = 'SELECT DISTINCT ind.i_id AS xref, ind.i_gedcom AS gedcom FROM `##individuals` ind';
- $bind = array();
-
- // Join the following tables
- $father_name = false;
- $mother_name = false;
- $spouse_family = false;
- $indi_name = false;
- $indi_date = false;
- $fam_date = false;
- $indi_plac = false;
- $fam_plac = false;
- foreach ($this->fields as $n => $field) {
- if ($this->values[$n]) {
- if (substr($field, 0, 14) == 'FAMC:HUSB:NAME') {
- $father_name = true;
- } elseif (substr($field, 0, 14) == 'FAMC:WIFE:NAME') {
- $mother_name = true;
- } elseif (substr($field, 0, 4) == 'NAME') {
- $indi_name = true;
- } elseif (strpos($field, ':DATE') !== false) {
- if (substr($field, 0, 4) == 'FAMS') {
- $fam_date = true;
- $spouse_family = true;
- } else {
- $indi_date = true;
- }
- } elseif (strpos($field, ':PLAC') !== false) {
- if (substr($field, 0, 4) == 'FAMS') {
- $fam_plac = true;
- $spouse_family = true;
- } else {
- $indi_plac = true;
- }
- } elseif ($field == 'FAMS:NOTE') {
- $spouse_family = true;
- }
- }
- }
-
- if ($father_name || $mother_name) {
- $sql .= " JOIN `##link` l_1 ON (l_1.l_file=ind.i_file AND l_1.l_from=ind.i_id AND l_1.l_type='FAMC')";
- }
- if ($father_name) {
- $sql .= " JOIN `##link` l_2 ON (l_2.l_file=ind.i_file AND l_2.l_from=l_1.l_to AND l_2.l_type='HUSB')";
- $sql .= " JOIN `##name` f_n ON (f_n.n_file=ind.i_file AND f_n.n_id =l_2.l_to)";
- }
- if ($mother_name) {
- $sql .= " JOIN `##link` l_3 ON (l_3.l_file=ind.i_file AND l_3.l_from=l_1.l_to AND l_3.l_type='WIFE')";
- $sql .= " JOIN `##name` m_n ON (m_n.n_file=ind.i_file AND m_n.n_id =l_3.l_to)";
- }
- if ($spouse_family) {
- $sql .= " JOIN `##link` l_4 ON (l_4.l_file=ind.i_file AND l_4.l_from=ind.i_id AND l_4.l_type='FAMS')";
- $sql .= " JOIN `##families` fam ON (fam.f_file=ind.i_file AND fam.f_id =l_4.l_to)";
- }
- if ($indi_name) {
- $sql .= " JOIN `##name` i_n ON (i_n.n_file=ind.i_file AND i_n.n_id=ind.i_id)";
- }
- if ($indi_date) {
- $sql .= " JOIN `##dates` i_d ON (i_d.d_file=ind.i_file AND i_d.d_gid=ind.i_id)";
- }
- if ($fam_date) {
- $sql .= " JOIN `##dates` f_d ON (f_d.d_file=ind.i_file AND f_d.d_gid=fam.f_id)";
- }
- if ($indi_plac) {
- $sql .= " JOIN `##placelinks` i_pl ON (i_pl.pl_file=ind.i_file AND i_pl.pl_gid =ind.i_id)";
- $sql .= " JOIN (" .
- "SELECT CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place) AS place, p1.p_id AS id, p1.p_file AS file" .
- " FROM `##places` AS p1" .
- " LEFT JOIN `##places` AS p2 ON (p1.p_parent_id=p2.p_id)" .
- " LEFT JOIN `##places` AS p3 ON (p2.p_parent_id=p3.p_id)" .
- " LEFT JOIN `##places` AS p4 ON (p3.p_parent_id=p4.p_id)" .
- " LEFT JOIN `##places` AS p5 ON (p4.p_parent_id=p5.p_id)" .
- " LEFT JOIN `##places` AS p6 ON (p5.p_parent_id=p6.p_id)" .
- " LEFT JOIN `##places` AS p7 ON (p6.p_parent_id=p7.p_id)" .
- " LEFT JOIN `##places` AS p8 ON (p7.p_parent_id=p8.p_id)" .
- " LEFT JOIN `##places` AS p9 ON (p8.p_parent_id=p9.p_id)" .
- ") AS i_p ON (i_p.file =ind.i_file AND i_pl.pl_p_id= i_p.id)";
- }
- if ($fam_plac) {
- $sql .= " JOIN `##placelinks` f_pl ON (f_pl.pl_file=ind.i_file AND f_pl.pl_gid =fam.f_id)";
- $sql .= " JOIN (" .
- "SELECT CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place) AS place, p1.p_id AS id, p1.p_file AS file" .
- " FROM `##places` AS p1" .
- " LEFT JOIN `##places` AS p2 ON (p1.p_parent_id=p2.p_id)" .
- " LEFT JOIN `##places` AS p3 ON (p2.p_parent_id=p3.p_id)" .
- " LEFT JOIN `##places` AS p4 ON (p3.p_parent_id=p4.p_id)" .
- " LEFT JOIN `##places` AS p5 ON (p4.p_parent_id=p5.p_id)" .
- " LEFT JOIN `##places` AS p6 ON (p5.p_parent_id=p6.p_id)" .
- " LEFT JOIN `##places` AS p7 ON (p6.p_parent_id=p7.p_id)" .
- " LEFT JOIN `##places` AS p8 ON (p7.p_parent_id=p8.p_id)" .
- " LEFT JOIN `##places` AS p9 ON (p8.p_parent_id=p9.p_id)" .
- ") AS f_p ON (f_p.file =ind.i_file AND f_pl.pl_p_id= f_p.id)";
- }
- // Add the where clause
- $sql .= " WHERE ind.i_file=?";
- $bind[] = $WT_TREE->getTreeId();
- for ($i = 0; $i < $fct; $i++) {
- $field = $this->fields[$i];
- $value = $this->values[$i];
- if ($value === '') {
- continue;
- }
- $parts = preg_split("/:/", $field . '::::');
- if ($parts[0] == 'NAME') {
- // NAME:*
- switch ($parts[1]) {
- case 'GIVN':
- switch ($parts[2]) {
- case 'EXACT':
- $sql .= " AND i_n.n_givn=?";
- $bind[] = $value;
- break;
- case 'BEGINS':
- $sql .= " AND i_n.n_givn LIKE CONCAT(?, '%')";
- $bind[] = $value;
- break;
- case 'CONTAINS':
- $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- break;
- case 'SDX_STD':
- $sdx = Soundex::russell($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "i_n.n_soundex_givn_std LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- case 'SDX': // SDX uses DM by default.
- case 'SDX_DM':
- $sdx = Soundex::daitchMokotoff($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "i_n.n_soundex_givn_dm LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- }
- break;
- case 'SURN':
- switch ($parts[2]) {
- case 'EXACT':
- $sql .= " AND i_n.n_surname=?";
- $bind[] = $value;
- break;
- case 'BEGINS':
- $sql .= " AND i_n.n_surname LIKE CONCAT(?, '%')";
- $bind[] = $value;
- break;
- case 'CONTAINS':
- $sql .= " AND i_n.n_surname LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- break;
- case 'SDX_STD':
- $sdx = Soundex::russell($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "i_n.n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= " AND (" . implode(' OR ', $sdx) . ")";
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- case 'SDX': // SDX uses DM by default.
- case 'SDX_DM':
- $sdx = Soundex::daitchMokotoff($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "i_n.n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= " AND (" . implode(' OR ', $sdx) . ")";
- break;
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- }
- break;
- case 'NICK':
- case '_MARNM':
- case '_HEB':
- case '_AKA':
- $sql .= " AND i_n.n_type=? AND i_n.n_full LIKE CONCAT('%', ?, '%')";
- $bind[] = $parts[1];
- $bind[] = $value;
- break;
- }
- } elseif ($parts[1] == 'DATE') {
- // *:DATE
- $date = new Date($value);
- if ($date->isOK()) {
- $jd1 = $date->minimumJulianDay();
- $jd2 = $date->maximumJulianDay();
- if (!empty($this->plusminus[$i])) {
- $adjd = $this->plusminus[$i] * 365;
- $jd1 -= $adjd;
- $jd2 += $adjd;
- }
- $sql .= " AND i_d.d_fact=? AND i_d.d_julianday1>=? AND i_d.d_julianday2<=?";
- $bind[] = $parts[0];
- $bind[] = $jd1;
- $bind[] = $jd2;
- }
- } elseif ($parts[0] == 'FAMS' && $parts[2] == 'DATE') {
- // FAMS:*:DATE
- $date = new Date($value);
- if ($date->isOK()) {
- $jd1 = $date->minimumJulianDay();
- $jd2 = $date->maximumJulianDay();
- if (!empty($this->plusminus[$i])) {
- $adjd = $this->plusminus[$i] * 365;
- $jd1 -= $adjd;
- $jd2 += $adjd;
- }
- $sql .= " AND f_d.d_fact=? AND f_d.d_julianday1>=? AND f_d.d_julianday2<=?";
- $bind[] = $parts[1];
- $bind[] = $jd1;
- $bind[] = $jd2;
- }
- } elseif ($parts[1] == 'PLAC') {
- // *:PLAC
- // SQL can only link a place to a person/family, not to an event.
- $sql .= " AND i_p.place LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- } elseif ($parts[0] == 'FAMS' && $parts[2] == 'PLAC') {
- // FAMS:*:PLAC
- // SQL can only link a place to a person/family, not to an event.
- $sql .= " AND f_p.place LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- } elseif ($parts[0] == 'FAMC' && $parts[2] == 'NAME') {
- $table = $parts[1] == 'HUSB' ? 'f_n' : 'm_n';
- // NAME:*
- switch ($parts[3]) {
- case 'GIVN':
- switch ($parts[4]) {
- case 'EXACT':
- $sql .= " AND {$table}.n_givn=?";
- $bind[] = $value;
- break;
- case 'BEGINS':
- $sql .= " AND {$table}.n_givn LIKE CONCAT(?, '%')";
- $bind[] = $value;
- break;
- case 'CONTAINS':
- $sql .= " AND {$table}.n_givn LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- break;
- case 'SDX_STD':
- $sdx = Soundex::russell($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "{$table}.n_soundex_givn_std LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- case 'SDX': // SDX uses DM by default.
- case 'SDX_DM':
- $sdx = Soundex::daitchMokotoff($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "{$table}.n_soundex_givn_dm LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- break;
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- }
- break;
- case 'SURN':
- switch ($parts[4]) {
- case 'EXACT':
- $sql .= " AND {$table}.n_surname=?";
- $bind[] = $value;
- break;
- case 'BEGINS':
- $sql .= " AND {$table}.n_surname LIKE CONCAT(?, '%')";
- $bind[] = $value;
- break;
- case 'CONTAINS':
- $sql .= " AND {$table}.n_surname LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- break;
- case 'SDX_STD':
- $sdx = Soundex::russell($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "{$table}.n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- case 'SDX': // SDX uses DM by default.
- case 'SDX_DM':
- $sdx = Soundex::daitchMokotoff($value);
- if ($sdx !== null) {
- $sdx = explode(':', $sdx);
- foreach ($sdx as $k => $v) {
- $sdx[$k] = "{$table}.n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
- $bind[] = $v;
- }
- $sql .= ' AND (' . implode(' OR ', $sdx) . ')';
- } else {
- // No phonetic content? Use a substring match
- $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')";
- $bind[] = $value;
- }
- break;
- }
- break;
- }
- } elseif ($parts[0] === 'FAMS') {
- // e.g. searches for occupation, religion, note, etc.
- $sql .= " AND fam.f_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)";
- $bind[] = $parts[1];
- $bind[] = $value;
- } elseif ($parts[1] === 'TYPE') {
- // e.g. FACT:TYPE or EVEN:TYPE
- $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n1 ', ?, '.*(\n[2-9] .*)*\n2 TYPE .*', ?)";
- $bind[] = $parts[0];
- $bind[] = $value;
- } else {
- // e.g. searches for occupation, religion, note, etc.
- $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)";
- $bind[] = $parts[0];
- $bind[] = $value;
- }
- }
- $rows = Database::prepare($sql)->execute($bind)->fetchAll();
- foreach ($rows as $row) {
- $person = Individual::getInstance($row->xref, $WT_TREE, $row->gedcom);
- // Check for XXXX:PLAC fields, which were only partially matched by SQL
- foreach ($this->fields as $n => $field) {
- if ($this->values[$n] && preg_match('/^(' . WT_REGEX_TAG . '):PLAC$/', $field, $match)) {
- if (!preg_match('/\n1 ' . $match[1] . '(\n[2-9].*)*\n2 PLAC .*' . preg_quote($this->values[$n], '/') . '/i', $person->getGedcom())) {
- continue 2;
- }
- }
- }
- $this->myindilist[] = $person;
- }
- }
-
- /**
- * Display the search results
- */
- public function printResults() {
- if ($this->myindilist) {
- uasort($this->myindilist, '\Fisharebest\Webtrees\GedcomRecord::compare');
- echo FunctionsPrintLists::individualTable($this->myindilist);
- } elseif (array_filter($this->values)) {
- echo '
', I18N::translate('No results found.'), '
';
- }
- }
-}
diff --git a/sources/app/Controller/AjaxController.php b/sources/app/Controller/AjaxController.php
deleted file mode 100644
index 4aac9ed..0000000
--- a/sources/app/Controller/AjaxController.php
+++ /dev/null
@@ -1,59 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-/**
- * Base controller for all popup pages
- */
-class AjaxController extends BaseController {
- /**
- * Print the page header, using the theme
- *
- * @return $this
- */
- public function pageHeader() {
- // Ajax responses are always UTF8
- header('Content-Type: text/html; charset=UTF-8');
- // We've displayed the header - display the footer automatically
- register_shutdown_function(array($this, 'pageFooter'));
-
- return $this;
- }
-
- /**
- * Print the page footer, using the theme
- */
- public function pageFooter() {
- // Ajax responses may have Javascript
- echo $this->getJavascript();
- }
-
- /**
- * Restrict access.
- *
- * @param bool $condition
- *
- * @return $this
- */
- public function restrictAccess($condition) {
- if ($condition !== true) {
- http_response_code(403);
- exit;
- }
-
- return $this;
- }
-}
diff --git a/sources/app/Controller/AncestryController.php b/sources/app/Controller/AncestryController.php
deleted file mode 100644
index 831b985..0000000
--- a/sources/app/Controller/AncestryController.php
+++ /dev/null
@@ -1,112 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\FunctionsCharts;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Controller for the ancestry chart
- */
-class AncestryController extends ChartController {
- /** @var int Show boxes for cousins */
- public $show_cousins;
-
- /** @var int Determines style of chart */
- public $chart_style;
-
- /** @var int Number of generations to display */
- public $generations;
-
- /**
- * Startup activity
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
-
- // Extract form parameters
- $this->show_cousins = Filter::getInteger('show_cousins', 0, 1);
- $this->chart_style = Filter::getInteger('chart_style', 0, 3);
- $this->generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
-
- if ($this->root && $this->root->canShowName()) {
- $this->setPageTitle(
- /* I18N: %s is an individual’s name */
- I18N::translate('Ancestors of %s', $this->root->getFullName())
- );
- } else {
- $this->setPageTitle(I18N::translate('Ancestors'));
- }
- }
-
- /**
- * print a child ascendancy
- *
- * @param Individual $individual
- * @param int $sosa child sosa number
- * @param int $depth the ascendancy depth to show
- */
- public function printChildAscendancy(Individual $individual, $sosa, $depth) {
- echo '
';
- echo '';
- if ($sosa === 1) {
- echo ' ';
- } else {
- echo ' ';
- echo ' ';
- }
- FunctionsPrint::printPedigreePerson($individual, $this->showFull());
- echo ' ';
- if ($sosa > 1) {
- FunctionsCharts::printUrlArrow('?rootid=' . $individual->getXref() . '&PEDIGREE_GENERATIONS=' . $this->generations . '&show_full=' . $this->showFull() . '&chart_style=' . $this->chart_style . '&ged=' . $individual->getTree()->getNameUrl(), I18N::translate('Ancestors of %s', $individual->getFullName()), 3);
- }
- echo ' ', I18N::number($sosa), ' ';
- echo ' ', FunctionsCharts::getSosaName($sosa), ' ';
- echo '
';
-
- // Parents
- $family = $individual->getPrimaryChildFamily();
- if ($family && $depth > 0) {
- // Marriage details
- echo '';
- echo ' ';
- echo ' ', I18N::number($sosa * 2), ' ', I18N::translate('and');
- echo ' ', I18N::number($sosa * 2 + 1), ' ';
- if ($family->canShow()) {
- foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' ', $fact->summary(), ' ';
- }
- }
- echo ' ';
- // display parents recursively - or show empty boxes
- echo '';
- if ($family->getHusband()) {
- $this->printChildAscendancy($family->getHusband(), $sosa * 2, $depth - 1);
- }
- if ($family->getWife()) {
- $this->printChildAscendancy($family->getWife(), $sosa * 2 + 1, $depth - 1);
- }
- echo ' ';
- }
- echo ' ';
- }
-}
diff --git a/sources/app/Controller/BaseController.php b/sources/app/Controller/BaseController.php
deleted file mode 100644
index c049ce8..0000000
--- a/sources/app/Controller/BaseController.php
+++ /dev/null
@@ -1,139 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Database;
-
-/**
- * Base controller for all other controllers
- */
-class BaseController {
- // The controller accumulates Javascript (inline and external), and renders it in the footer
- const JS_PRIORITY_HIGH = 0;
- const JS_PRIORITY_NORMAL = 1;
- const JS_PRIORITY_LOW = 2;
-
- /** @var string[][] Inline JavaScript to add to the page. */
- private $inline_javascript = array(
- self::JS_PRIORITY_HIGH => array(),
- self::JS_PRIORITY_NORMAL => array(),
- self::JS_PRIORITY_LOW => array(),
- );
-
- /** @var string[] Exteral JavaScript files to load. */
- private $external_javascript = array();
-
- /**
- * Startup activity
- */
- public function __construct() {
- }
-
- /**
- * Make a list of external Javascript, so we can render them in the footer
- *
- * @param string $script_name
- *
- * @return $this
- */
- public function addExternalJavascript($script_name) {
- $this->external_javascript[$script_name] = true;
-
- return $this;
- }
-
- /**
- * Make a list of inline Javascript, so we can render them in the footer
- * NOTE: there is no need to use "jQuery(document).ready(function(){...})", etc.
- * as this Javascript won’t be inserted until the very end of the page.
- *
- * @param string $script
- * @param int $priority
- *
- * @return $this
- */
- public function addInlineJavascript($script, $priority = self::JS_PRIORITY_NORMAL) {
- $tmp = &$this->inline_javascript[$priority];
- $tmp[] = $script;
-
- return $this;
- }
-
- /**
- * We've collected up Javascript fragments while rendering the page.
- * Now display them in order.
- *
- * @return string
- */
- public function getJavascript() {
- $javascript1 = '';
- $javascript2 = '';
- $javascript3 = '';
-
- // Inline (high priority) javascript
- foreach ($this->inline_javascript[self::JS_PRIORITY_HIGH] as $script) {
- $javascript1 .= $script;
- }
-
- // External javascript
- foreach (array_keys($this->external_javascript) as $script_name) {
- $javascript2 .= '';
- }
-
- // Inline (lower priority) javascript
- if ($this->inline_javascript) {
- foreach ($this->inline_javascript as $priority => $scripts) {
- if ($priority !== self::JS_PRIORITY_HIGH) {
- foreach ($scripts as $script) {
- $javascript3 .= $script;
- }
- }
- }
- }
-
- // We could, in theory, inject JS at any point in the page (not just the bottom) - prepare for next time
- $this->inline_javascript = array(
- self::JS_PRIORITY_HIGH => array(),
- self::JS_PRIORITY_NORMAL => array(),
- self::JS_PRIORITY_LOW => array(),
- );
- $this->external_javascript = array();
-
- return '' . $javascript2 . '';
- }
-
- /**
- * Print the page header, using the theme
- *
- * @return $this
- */
- public function pageHeader() {
- // We've displayed the header - display the footer automatically
- register_shutdown_function(array($this, 'pageFooter'));
-
- return $this;
- }
-
- /**
- * Print the page footer, using the theme
- */
- public function pageFooter() {
- if (WT_DEBUG_SQL) {
- echo Database::getQueryLog();
- }
- echo $this->getJavascript();
- }
-}
diff --git a/sources/app/Controller/BranchesController.php b/sources/app/Controller/BranchesController.php
deleted file mode 100644
index e17fb1a..0000000
--- a/sources/app/Controller/BranchesController.php
+++ /dev/null
@@ -1,292 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Database;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Soundex;
-
-/**
- * Controller for the branches list
- */
-class BranchesController extends PageController {
- /** @var string Generate the branches for this surname */
- private $surname;
-
- /** @var bool Whether to use Standard phonetic matching */
- private $soundex_std;
-
- /** @var bool Whether to use Daitch-Mokotov phonetic matching */
- private $soundex_dm;
-
- /** @var Individual[] Everyone with the selected surname */
- private $individuals = array();
-
- /** @var Individual[] Ancestors of the root person - for SOSA numbers */
- private $ancestors = array();
-
- /**
- * Create a branches list controller
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
-
- $this->surname = Filter::get('surname');
- $this->soundex_std = Filter::getBool('soundex_std');
- $this->soundex_dm = Filter::getBool('soundex_dm');
-
- if ($this->surname) {
- $this->setPageTitle(/* I18N: %s is a surname */
- I18N::translate('Branches of the %s family', Filter::escapeHtml($this->surname)));
- $this->loadIndividuals();
- $self = Individual::getInstance($WT_TREE->getUserPreference(Auth::user(), 'gedcomid'), $WT_TREE);
- if ($self) {
- $this->loadAncestors($self, 1);
- }
- } else {
- $this->setPageTitle(/* I18N: Branches of a family tree */ I18N::translate('Branches'));
- }
- }
-
- /**
- * The surname to be used on this page.
- *
- * @return null|string
- */
- public function getSurname() {
- return $this->surname;
- }
-
- /**
- * Should we use Standard phonetic matching
- *
- * @return bool
- */
- public function getSoundexStd() {
- return $this->soundex_std;
- }
-
- /**
- * Should we use Daitch-Mokotov phonetic matching
- *
- * @return bool
- */
- public function getSoundexDm() {
- return $this->soundex_dm;
- }
-
- /**
- * Fetch all individuals with a matching surname
- */
- private function loadIndividuals() {
- global $WT_TREE;
-
- $sql =
- "SELECT DISTINCT i_id AS xref, i_gedcom AS gedcom" .
- " FROM `##individuals`" .
- " JOIN `##name` ON (i_id=n_id AND i_file=n_file)" .
- " WHERE n_file = ?" .
- " AND n_type != ?" .
- " AND (n_surn = ? OR n_surname = ?";
- $args = array($WT_TREE->getTreeId(), '_MARNM', $this->surname, $this->surname);
- if ($this->soundex_std) {
- $sdx = Soundex::russell($this->surname);
- if ($sdx !== null) {
- foreach (explode(':', $sdx) as $value) {
- $sql .= " OR n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
- $args[] = $value;
- }
- }
- }
- if ($this->soundex_dm) {
- $sdx = Soundex::daitchMokotoff($this->surname);
- if ($sdx !== null) {
- foreach (explode(':', $sdx) as $value) {
- $sql .= " OR n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
- $args[] = $value;
- }
- }
- }
- $sql .= ')';
- $rows = Database::prepare($sql)->execute($args)->fetchAll();
- $this->individuals = array();
- foreach ($rows as $row) {
- $this->individuals[] = Individual::getInstance($row->xref, $WT_TREE, $row->gedcom);
- }
- // Sort by birth date, oldest first
- usort($this->individuals, '\Fisharebest\Webtrees\Individual::compareBirthDate');
- }
-
- /**
- * Load the ancestors of an individual, so we can highlight them in the list
- *
- * @param Individual $ancestor
- * @param int $sosa
- */
- private function loadAncestors(Individual $ancestor, $sosa) {
- if ($ancestor) {
- $this->ancestors[$sosa] = $ancestor;
- foreach ($ancestor->getChildFamilies() as $family) {
- foreach ($family->getSpouses() as $parent) {
- $this->loadAncestors($parent, $sosa * 2 + ($parent->getSex() == 'F' ? 1 : 0));
- }
- }
- }
- }
-
- /**
- * For each individual with no ancestors, list their descendants.
- *
- * @return string
- */
- public function getPatriarchsHtml() {
- $html = '';
- foreach ($this->individuals as $individual) {
- foreach ($individual->getChildFamilies() as $family) {
- foreach ($family->getSpouses() as $parent) {
- if (in_array($parent, $this->individuals, true)) {
- continue 3;
- }
- }
- }
- $html .= $this->getDescendantsHtml($individual);
- }
-
- return $html;
- }
-
- /**
- * Generate a recursive list of descendants of an individual.
- * If parents are specified, we can also show the pedigree (adopted, etc.).
- *
- * @param Individual $individual
- * @param Family|null $parents
- *
- * @return string
- */
- private function getDescendantsHtml(Individual $individual, Family $parents = null) {
- // A person has many names. Select the one that matches the searched surname
- $person_name = '';
- foreach ($individual->getAllNames() as $name) {
- list($surn1) = explode(",", $name['sort']);
- if (// one name is a substring of the other
- stripos($surn1, $this->surname) !== false ||
- stripos($this->surname, $surn1) !== false ||
- // one name sounds like the other
- $this->soundex_std && Soundex::compare(Soundex::russell($surn1), Soundex::russell($this->surname)) ||
- $this->soundex_dm && Soundex::compare(Soundex::daitchMokotoff($surn1), Soundex::daitchMokotoff($this->surname))
- ) {
- $person_name = $name['full'];
- break;
- }
- }
-
- // No matching name? Typically children with a different surname. The branch stops here.
- if (!$person_name) {
- return '
' . $individual->getSexImage() . '… ';
- }
-
- // Is this individual one of our ancestors?
- $sosa = array_search($individual, $this->ancestors, true);
- if ($sosa) {
- $sosa_class = 'search_hit';
- $sosa_html = '
' . $sosa . ' ' . self::sosaGeneration($sosa);
- } else {
- $sosa_class = '';
- $sosa_html = '';
- }
-
- // Generate HTML for this individual, and all their descendants
- $indi_html = $individual->getSexImage() . '
' . $person_name . ' ' . $individual->getLifeSpan() . $sosa_html;
-
- // If this is not a birth pedigree (e.g. an adoption), highlight it
- if ($parents) {
- $pedi = '';
- foreach ($individual->getFacts('FAMC') as $fact) {
- if ($fact->getTarget() === $parents) {
- $pedi = $fact->getAttribute('PEDI');
- break;
- }
- }
- if ($pedi && $pedi != 'birth') {
- $indi_html = '
' . GedcomCodePedi::getValue($pedi, $individual) . ' ' . $indi_html;
- }
- }
-
- // spouses and children
- $spouse_families = $individual->getSpouseFamilies();
- if ($spouse_families) {
- usort($spouse_families, '\Fisharebest\Webtrees\Family::compareMarrDate');
- $fam_html = '';
- foreach ($spouse_families as $family) {
- $fam_html .= $indi_html; // Repeat the individual details for each spouse.
-
- $spouse = $family->getSpouse($individual);
- if ($spouse) {
- $sosa = array_search($spouse, $this->ancestors, true);
- if ($sosa) {
- $sosa_class = 'search_hit';
- $sosa_html = '
' . $sosa . ' ' . self::sosaGeneration($sosa);
- } else {
- $sosa_class = '';
- $sosa_html = '';
- }
- $marriage_year = $family->getMarriageYear();
- if ($marriage_year) {
- $fam_html .= '
' . $marriage_year . '';
- } elseif ($family->getFirstFact('MARR')) {
- $fam_html .= '
';
- } elseif ($family->getFirstFact('_NMR')) {
- $fam_html .= '
';
- }
- $fam_html .= ' ' . $spouse->getSexImage() . '
' . $spouse->getFullName() . ' ' . $spouse->getLifeSpan() . ' ' . $sosa_html;
- }
-
- $fam_html .= '
';
- foreach ($family->getChildren() as $child) {
- $fam_html .= $this->getDescendantsHtml($child, $family);
- }
- $fam_html .= ' ';
- }
-
- return '
' . $fam_html . ' ';
- } else {
- // No spouses - just show the individual
- return '
' . $indi_html . ' ';
- }
- }
-
- /**
- * Convert a SOSA number into a generation number. e.g. 8 = great-grandfather = 3 generations
- *
- * @param int $sosa
- *
- * @return string
- */
- private static function sosaGeneration($sosa) {
- $generation = (int) log($sosa, 2) + 1;
-
- return '
' . $generation . ' ';
- }
-}
diff --git a/sources/app/Controller/ChartController.php b/sources/app/Controller/ChartController.php
deleted file mode 100644
index 12e1207..0000000
--- a/sources/app/Controller/ChartController.php
+++ /dev/null
@@ -1,143 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Base controller for all chart pages
- */
-class ChartController extends PageController {
- /** @var Individual Who is chart about? */
- public $root;
-
- /** @var bool determines the detail shown in the personbox */
- private $show_full;
-
- /** @var string An error message, in case we cannot construct the chart */
- public $error_message;
-
- /** @var \stdClass personbox dimensions */
- private $box;
- /**
- * Create the chart controller
- *
- * @param int $show_full needed for use by charts module
- */
- public function __construct($show_full = 1) {
- global $WT_TREE;
-
- parent::__construct();
-
- $rootid = Filter::get('rootid', WT_REGEX_XREF);
- $this->root = Individual::getInstance($rootid, $WT_TREE);
- if (!$this->root) {
- // Missing root individual? Show the chart for someone.
- $this->root = $this->getSignificantIndividual();
- }
-
- if (!$this->root) {
- http_response_code(404);
- $this->error_message = I18N::translate('This individual does not exist or you do not have permission to view it.');
- }
-
- // Extract parameter from form
- if ($show_full) {
- $this->show_full = Filter::getInteger('show_full', 0, 1, $WT_TREE->getPreference('PEDIGREE_FULL_DETAILS'));
- } else {
- $this->show_full = 0;
- }
-
- $this->box = new \stdClass();
- if ($this->showFull()) {
- $this->box->width = Theme::theme()->parameter('chart-box-x');
- $this->box->height = Theme::theme()->parameter('chart-box-y');
- } else {
- $this->box->width = Theme::theme()->parameter('compact-chart-box-x');
- $this->box->height = Theme::theme()->parameter('compact-chart-box-y');
- }
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return Individual
- */
- public function getSignificantIndividual() {
- if ($this->root) {
- return $this->root;
- } else {
- return parent::getSignificantIndividual();
- }
- }
-
- /**
- * Find the direct-line ancestors of an individual. Array indexes are SOSA numbers.
- *
- * @param int $generations
- *
- * @return Individual[]
- */
- public function sosaAncestors($generations) {
- $ancestors = array(
- 1 => $this->root,
- );
-
- // Subtract one generation, as this algorithm includes parents.
- $max = pow(2, $generations - 1);
-
- for ($i = 1; $i < $max; $i++) {
- $ancestors[$i * 2] = null;
- $ancestors[$i * 2 + 1] = null;
- $person = $ancestors[$i];
- if ($person) {
- $family = $person->getPrimaryChildFamily();
- if ($family) {
- if ($family->getHusband()) {
- $ancestors[$i * 2] = $family->getHusband();
- }
- if ($family->getWife()) {
- $ancestors[$i * 2 + 1] = $family->getWife();
- }
- }
- }
- }
-
- return $ancestors;
- }
-
- /**
- * Function showFull
- *
- * @return bool
- */
- public function showFull() {
- return $this->show_full;
- }
-
- /**
- * Function boxDimensions
- *
- * @return \stdClass
- */
- public function getBoxDimensions() {
- return $this->box;
- }
-}
diff --git a/sources/app/Controller/CompactController.php b/sources/app/Controller/CompactController.php
deleted file mode 100644
index 8bbe07a..0000000
--- a/sources/app/Controller/CompactController.php
+++ /dev/null
@@ -1,137 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\I18N;
-
-/**
- * Controller for the compact chart
- */
-class CompactController extends ChartController {
- /** @var bool Data for the view .*/
- public $show_thumbs = false;
-
- /** int[] Data for the controller. */
- private $treeid = array();
-
- /**
- * Startup activity
- */
- public function __construct() {
- parent::__construct();
-
- // Extract the request parameters
- $this->show_thumbs = Filter::getBool('show_thumbs');
-
- if ($this->root && $this->root->canShowName()) {
- $this->setPageTitle(
- /* I18N: %s is an individual’s name */
- I18N::translate('Compact tree of %s', $this->root->getFullName())
- );
- } else {
- $this->setPageTitle(I18N::translate('Compact tree'));
- }
- $this->treeid = $this->sosaAncestors(5);
- }
-
- /**
- * Get an individual by their SOSA number.
- *
- * @param int $n
- *
- * @return string
- */
- public function sosaIndividual($n) {
- $indi = $this->treeid[$n];
-
- if ($indi && $indi->canShowName()) {
- $name = $indi->getFullName();
- $addname = $indi->getAddName();
-
- if ($this->show_thumbs && $indi->getTree()->getPreference('SHOW_HIGHLIGHT_IMAGES')) {
- $html = $indi->displayImage();
- } else {
- $html = '';
- }
-
- $html .= '
';
- $html .= $name;
- if ($addname) {
- $html .= ' ' . $addname;
- }
- $html .= ' ';
- $html .= '
';
- if ($indi->canShow()) {
- $html .= '
' . $indi->getLifeSpan() . '
';
- }
- } else {
- // Empty box
- $html = ' ';
- }
-
- // -- box color
- $isF = '';
- if ($n == 1) {
- if ($indi && $indi->getSex() == 'F') {
- $isF = 'F';
- }
- } elseif ($n % 2) {
- $isF = 'F';
- }
-
- // -- box size
- if ($n == 1) {
- return '
' . $html . ' ';
- } else {
- return '
' . $html . ' ';
- }
- }
-
- /**
- * Get an arrow, pointing to other generations.
- *
- * @param int $n
- * @param string $arrow_dir
- *
- * @return string
- */
- public function sosaArrow($n, $arrow_dir) {
- $indi = $this->treeid[$n];
-
- $arrow_dir = substr($arrow_dir, 0, 1);
- if (I18N::direction() === 'rtl') {
- if ($arrow_dir === 'l') {
- $arrow_dir = 'r';
- } elseif ($arrow_dir === 'r') {
- $arrow_dir = 'l';
- }
- }
-
- if ($indi) {
- $title = I18N::translate('Compact tree of %s', $indi->getFullName());
- $text = '
show_thumbs;
- }
- $text .= "\"> ";
- } else {
- $text = '
';
- }
-
- return $text;
- }
-}
diff --git a/sources/app/Controller/DescendancyController.php b/sources/app/Controller/DescendancyController.php
deleted file mode 100644
index 2383749..0000000
--- a/sources/app/Controller/DescendancyController.php
+++ /dev/null
@@ -1,276 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\FunctionsCharts;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-use Rhumsaa\Uuid\Uuid;
-
-/**
- * Controller for the descendancy chart
- */
-class DescendancyController extends ChartController {
- /** @var int Show boxes for cousins */
- public $show_cousins;
-
- /** @var int Determines style of chart */
- public $chart_style;
-
- /** @var int Number of generations to display */
- public $generations;
-
- /** @var array d'Aboville numbering system
*/
- public $dabo_num = array();
-
- /** @var array d'Aboville numbering system */
- public $dabo_sex = array();
-
- /**
- * Create the descendancy controller
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
-
- // Extract parameters from form
- $this->chart_style = Filter::getInteger('chart_style', 0, 3, 0);
- $this->generations = Filter::getInteger('generations', 2, $WT_TREE->getPreference('MAX_DESCENDANCY_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
-
- if ($this->root && $this->root->canShowName()) {
- $this->setPageTitle(
- /* I18N: %s is an individual’s name */
- I18N::translate('Descendants of %s', $this->root->getFullName())
- );
- } else {
- $this->setPageTitle(I18N::translate('Descendants'));
- }
- }
-
- /**
- * Print a child family
- *
- * @param Individual $person
- * @param int $depth the descendancy depth to show
- * @param string $label
- * @param string $gpid
- */
- public function printChildFamily(Individual $person, $depth, $label = '1.', $gpid = '') {
-
- if ($depth < 2) {
- return;
- }
- foreach ($person->getSpouseFamilies() as $family) {
- FunctionsCharts::printSosaFamily($family->getXref(), '', -1, $label, $person->getXref(), $gpid, 0, $this->showFull());
- $i = 1;
- foreach ($family->getChildren() as $child) {
- $this->printChildFamily($child, $depth - 1, $label . ($i++) . '.', $person->getXref());
- }
- }
- }
-
- /**
- * print a child descendancy
- *
- * @param Individual $person
- * @param int $depth the descendancy depth to show
- */
- public function printChildDescendancy(Individual $person, $depth) {
- echo "";
- echo "";
- if ($depth == $this->generations) {
- echo ' ";
- } else {
- echo ' ';
- echo ' ';
- }
- FunctionsPrint::printPedigreePerson($person, $this->showFull());
- echo ' ';
-
- // check if child has parents and add an arrow
- echo ' ';
- echo '';
- foreach ($person->getChildFamilies() as $cfamily) {
- foreach ($cfamily->getSpouses() as $parent) {
- FunctionsCharts::printUrlArrow('?rootid=' . $parent->getXref() . '&generations=' . $this->generations . '&chart_style=' . $this->chart_style . '&show_full=' . $this->showFull() . '&ged=' . $parent->getTree()->getNameUrl(), I18N::translate('Start at parents'), 2);
- // only show the arrow for one of the parents
- break;
- }
- }
-
- // d'Aboville child number
- $level = $this->generations - $depth;
- if ($this->showFull()) {
- echo ' ';
- }
- echo ''; //needed so that RTL languages will display this properly
- if (!isset($this->dabo_num[$level])) {
- $this->dabo_num[$level] = 0;
- }
- $this->dabo_num[$level]++;
- $this->dabo_num[$level + 1] = 0;
- $this->dabo_sex[$level] = $person->getSex();
- for ($i = 0; $i <= $level; $i++) {
- $isf = $this->dabo_sex[$i];
- if ($isf === 'M') {
- $isf = '';
- }
- if ($isf === 'U') {
- $isf = 'NN';
- }
- echo " " . $this->dabo_num[$i] . " ";
- if ($i < $level) {
- echo '.';
- }
- }
- echo " ";
- echo " ";
- echo "
";
- echo " ";
-
- // loop for each spouse
- foreach ($person->getSpouseFamilies() as $family) {
- $this->printFamilyDescendancy($person, $family, $depth);
- }
- }
-
- /**
- * print a family descendancy
- *
- * @param Individual $person
- * @param Family $family
- * @param int $depth the descendancy depth to show
- */
- private function printFamilyDescendancy(Individual $person, Family $family, $depth) {
- $uid = Uuid::uuid4(); // create a unique ID
- // print marriage info
- echo '';
- echo ' ';
- echo '';
- echo " ";
- if ($family->canShow()) {
- foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' ', $fact->summary(), ' ';
- }
- }
- echo ' ';
-
- // print spouse
- $spouse = $family->getSpouse($person);
- echo '';
- echo '';
- echo '';
- FunctionsPrint::printPedigreePerson($spouse, $this->showFull());
- echo ' ';
-
- // check if spouse has parents and add an arrow
- echo ' ';
- echo '';
- if ($spouse) {
- foreach ($spouse->getChildFamilies() as $cfamily) {
- foreach ($cfamily->getSpouses() as $parent) {
- FunctionsCharts::printUrlArrow('?rootid=' . $parent->getXref() . '&generations=' . $this->generations . '&chart_style=' . $this->chart_style . '&show_full=' . $this->showFull() . '&ged=' . $parent->getTree()->getNameUrl(), I18N::translate('Start at parents'), 2);
- // only show the arrow for one of the parents
- break;
- }
- }
- }
- if ($this->showFull()) {
- echo ' ';
- }
- echo ' ';
-
- // children
- $children = $family->getChildren();
- echo ' ';
- if ($children) {
- echo GedcomTag::getLabel('NCHI') . ': ' . count($children);
- } else {
- // Distinguish between no children (NCHI 0) and no recorded
- // children (no CHIL records)
- if (strpos($family->getGedcom(), '\n1 NCHI 0')) {
- echo GedcomTag::getLabel('NCHI') . ': ' . count($children);
- } else {
- echo I18N::translate('No children');
- }
- }
- echo '
';
- echo ' ';
- if ($depth > 1) {
- foreach ($children as $child) {
- $this->printChildDescendancy($child, $depth - 1);
- }
- }
- echo ' ';
- echo ' ';
- }
-
- /**
- * Find all the individuals that are descended from an individual.
- *
- * @param Individual $person
- * @param int $n
- * @param Individual[] $array
- *
- * @return Individual[]
- */
- public function individualDescendancy(Individual $person, $n, $array) {
- if ($n < 1) {
- return $array;
- }
- $array[$person->getXref()] = $person;
- foreach ($person->getSpouseFamilies() as $family) {
- $spouse = $family->getSpouse($person);
- if ($spouse) {
- $array[$spouse->getXref()] = $spouse;
- }
- foreach ($family->getChildren() as $child) {
- $array = $this->individualDescendancy($child, $n - 1, $array);
- }
- }
-
- return $array;
- }
-
- /**
- * Find all the families that are descended from an individual.
- *
- * @param Individual $person
- * @param int $n
- * @param Family[] $array
- *
- * @return Family[]
- */
- public function familyDescendancy($person, $n, $array) {
- if ($n < 1) {
- return $array;
- }
- foreach ($person->getSpouseFamilies() as $family) {
- $array[$family->getXref()] = $family;
- foreach ($family->getChildren() as $child) {
- $array = $this->familyDescendancy($child, $n - 1, $array);
- }
- }
-
- return $array;
- }
-}
diff --git a/sources/app/Controller/FamilyBookController.php b/sources/app/Controller/FamilyBookController.php
deleted file mode 100644
index 109f160..0000000
--- a/sources/app/Controller/FamilyBookController.php
+++ /dev/null
@@ -1,386 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Controller for the familybook chart
- */
-class FamilyBookController extends ChartController {
- /** @var int Whether to show spouse details */
- public $show_spouse;
-
- /** @var int Number of descendancy generations to show */
- public $descent;
-
- /** @var int Number of ascendancy generations to show */
- public $generations;
-
- /** @var int Number of descendancy generations that exist */
- private $dgenerations;
-
- /** @var int Half height of personbox */
- public $bhalfheight;
-
- /**
- * Create a family-book controller
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
-
- // Extract the request parameters
- $this->show_spouse = Filter::getInteger('show_spouse', 0, 1);
- $this->descent = Filter::getInteger('descent', 0, 9, 5);
- $this->generations = Filter::getInteger('generations', 2, $WT_TREE->getPreference('MAX_DESCENDANCY_GENERATIONS'), 2);
-
- $this->bhalfheight = $this->getBoxDimensions()->height / 2;
- if ($this->root && $this->root->canShowName()) {
- $this->setPageTitle(
- /* I18N: %s is an individual’s name */
- I18N::translate('Family book of %s', $this->root->getFullName())
- );
- } else {
- $this->setPageTitle(I18N::translate('Family book'));
- }
- //Checks how many generations of descendency is for the person for formatting purposes
- $this->dgenerations = $this->maxDescendencyGenerations($this->root->getXref(), 0);
-
- if ($this->dgenerations < 1) {
- $this->dgenerations = 1;
- }
- }
-
- /**
- * Prints descendency of passed in person
- *
- * @param Individual|null $person
- * @param int $generation
- *
- * @return int
- */
- private function printDescendency(Individual $person = null, $generation) {
-
- if ($generation > $this->dgenerations) {
- return 0;
- }
-
- echo '';
- $numkids = 0;
-
- // Load children
- $children = array();
- if ($person) {
- // Count is position from center to left, dgenerations is number of generations
- if ($generation < $this->dgenerations) {
- // All children, from all partners
- foreach ($person->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- $children[] = $child;
- }
- }
- }
- }
- if ($generation < $this->dgenerations) {
- if ($children) {
- // real people
- echo '';
- foreach ($children as $i => $child) {
- echo '';
- $kids = $this->printDescendency($child, $generation + 1);
- $numkids += $kids;
- echo ' ';
- // Print the lines
- if (count($children) > 1) {
- if ($i === 0) {
- // Adjust for the first column on left
- $h = round(((($this->getBoxDimensions()->height) * $kids) + 8) / 2); // Assumes border = 1 and padding = 3
- // Adjust for other vertical columns
- if ($kids > 1) {
- $h = ($kids - 1) * 4 + $h;
- }
- echo '',
- ' ';
- } elseif ($i === count($children) - 1) {
- // Adjust for the first column on left
- $h = round(((($this->getBoxDimensions()->height) * $kids) + 8) / 2);
- // Adjust for other vertical columns
- if ($kids > 1) {
- $h = ($kids - 1) * 4 + $h;
- }
- echo '',
- ' ';
- } else {
- echo '',
- ' ';
- }
- }
- echo ' ';
- }
- echo '
';
- } else {
- // Hidden/empty boxes - to preserve the layout
- echo '';
- $numkids += $this->printDescendency(null, $generation + 1);
- echo '
';
- }
- echo ' ';
- echo '';
- }
-
- if ($numkids === 0) {
- $numkids = 1;
- }
- echo '';
- if ($person) {
- FunctionsPrint::printPedigreePerson($person, $this->showFull());
- echo ' ',
- ' ';
- } else {
- echo '
',
- ' ';
- }
-
- // Print the spouse
- if ($generation === 1) {
- if ($this->show_spouse) {
- foreach ($person->getSpouseFamilies() as $family) {
- $spouse = $family->getSpouse($person);
- echo ' ';
- FunctionsPrint::printPedigreePerson($spouse, $this->showFull());
- $numkids += 0.95;
- echo ' ';
- }
- }
- }
- echo '
';
- echo ' ';
- echo '
';
-
- return $numkids;
- }
-
- /**
- * Prints pedigree of the person passed in
- *
- * @param Individual $person
- * @param int $count
- */
- private function printPersonPedigree($person, $count) {
- if ($count >= $this->generations) {
- return;
- }
-
- $genoffset = $this->generations; // handle pedigree n generations lines
- //-- calculate how tall the lines should be
- $lh = ($this->bhalfheight + 4) * pow(2, ($genoffset - $count - 1));
- //
- //Prints empty table columns for children w/o parents up to the max generation
- //This allows vertical line spacing to be consistent
- if (count($person->getChildFamilies()) == 0) {
- echo '';
- $this->printEmptyBox($this->getBoxDimensions()->width, $this->getBoxDimensions()->height);
-
- //-- recursively get the father’s family
- $this->printPersonPedigree($person, $count + 1);
- echo '';
- $this->printEmptyBox($this->getBoxDimensions()->width, $this->getBoxDimensions()->height);
-
- //-- recursively get the mother’s family
- $this->printPersonPedigree($person, $count + 1);
- echo '
';
- }
-
- // Empty box section done, now for regular pedigree
- foreach ($person->getChildFamilies() as $family) {
- echo '';
- // Determine line height for two or more spouces
- // And then adjust the vertical line for the root person only
- $famcount = 0;
- if ($this->show_spouse) {
- // count number of spouses
- $famcount += count($person->getSpouseFamilies());
- }
- $savlh = $lh; // Save current line height
- if ($count == 1 && $genoffset <= $famcount) {
- $linefactor = 0;
- // genoffset of 2 needs no adjustment
- if ($genoffset > 2) {
- $tblheight = $this->getBoxDimensions()->height + 8;
- if ($genoffset == 3) {
- if ($famcount == 3) {
- $linefactor = $tblheight / 2;
- } elseif ($famcount > 3) {
- $linefactor = $tblheight;
- }
- }
- if ($genoffset == 4) {
- if ($famcount == 4) {
- $linefactor = $tblheight;
- } elseif ($famcount > 4) {
- $linefactor = ($famcount - $genoffset) * ($tblheight * 1.5);
- }
- }
- if ($genoffset == 5) {
- if ($famcount == 5) {
- $linefactor = 0;
- } elseif ($famcount > 5) {
- $linefactor = $tblheight * ($famcount - $genoffset);
- }
- }
- }
- $lh = (($famcount - 1) * ($this->getBoxDimensions()->height + 8) - ($linefactor));
- if ($genoffset > 5) {
- $lh = $savlh;
- }
- }
- echo ' ',
- '',
- ' ',
- '';
- $lh = $savlh; // restore original line height
- //-- print the father box
- FunctionsPrint::printPedigreePerson($family->getHusband(), $this->showFull());
- echo ' ';
- if ($family->getHusband()) {
- echo '';
- //-- recursively get the father’s family
- $this->printPersonPedigree($family->getHusband(), $count + 1);
- echo ' ';
- } else {
- echo '';
- if ($genoffset > $count) {
- echo '';
- for ($i = 1; $i < (pow(2, ($genoffset) - $count) / 2); $i++) {
- $this->printEmptyBox($this->getBoxDimensions()->width, $this->getBoxDimensions()->height);
- echo '';
- }
- echo '
';
- }
- }
- echo ' ',
- ' ',
- ' ',
- '';
- //-- print the mother box
- FunctionsPrint::printPedigreePerson($family->getWife(), $this->showFull());
- echo ' ';
- if ($family->getWife()) {
- echo '';
- //-- recursively print the mother’s family
- $this->printPersonPedigree($family->getWife(), $count + 1);
- echo ' ';
- } else {
- echo '';
- if ($count < $genoffset - 1) {
- echo '';
- for ($i = 1; $i < (pow(2, ($genoffset - 1) - $count) / 2) + 1; $i++) {
- $this->printEmptyBox();
- echo '';
- $this->printEmptyBox();
- echo '';
- }
- echo '
';
- }
- }
- echo ' ',
- '
';
- break;
- }
- }
-
- /**
- * Calculates number of generations a person has
- *
- * @param string $pid
- * @param int $depth
- *
- * @return int
- */
- private function maxDescendencyGenerations($pid, $depth) {
- global $WT_TREE;
-
- if ($depth > $this->generations) {
- return $depth;
- }
- $person = Individual::getInstance($pid, $WT_TREE);
- if (is_null($person)) {
- return $depth;
- }
- $maxdc = $depth;
- foreach ($person->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- $dc = $this->maxDescendencyGenerations($child->getXref(), $depth + 1);
- if ($dc >= $this->generations) {
- return $dc;
- }
- if ($dc > $maxdc) {
- $maxdc = $dc;
- }
- }
- }
- $maxdc++;
- if ($maxdc == 1) {
- $maxdc++;
- }
-
- return $maxdc;
- }
-
- /**
- * Print empty box
- */
-
- private function printEmptyBox() {
- echo $this->showFull() ? Theme::theme()->individualBoxEmpty() : Theme::theme()->individualBoxSmallEmpty();
- }
-
- /**
- * Print a “Family Book” for an individual
- *
- * @param Individual $person
- * @param int $descent_steps
- */
- public function printFamilyBook(Individual $person, $descent_steps) {
- if ($descent_steps == 0 || !$person->canShowName()) {
- return;
- }
- $families = $person->getSpouseFamilies();
- if ($families) {
- echo
- '',
- /* I18N: A title/heading. %s is an individual’s name */ I18N::translate('Family of %s', $person->getFullName()),
- ' ',
- '';
- $this->dgenerations = $this->generations;
- $this->printDescendency($person, 1);
- echo ' ';
- $this->printPersonPedigree($person, 1);
- echo '
';
- foreach ($families as $family) {
- foreach ($family->getChildren() as $child) {
- $this->printFamilyBook($child, $descent_steps - 1);
- }
- }
- }
- }
-}
diff --git a/sources/app/Controller/FamilyController.php b/sources/app/Controller/FamilyController.php
deleted file mode 100644
index d01bfdf..0000000
--- a/sources/app/Controller/FamilyController.php
+++ /dev/null
@@ -1,176 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Menu;
-
-/**
- * Controller for the family page
- */
-class FamilyController extends GedcomRecordController {
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return Individual
- */
- public function getSignificantIndividual() {
- if ($this->record) {
- foreach ($this->record->getSpouses() as $individual) {
- return $individual;
- }
- foreach ($this->record->getChildren() as $individual) {
- return $individual;
- }
- }
-
- return parent::getSignificantIndividual();
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return Family
- */
- public function getSignificantFamily() {
- if ($this->record) {
- return $this->record;
- }
-
- return parent::getSignificantFamily();
- }
-
- /**
- * get edit menu
- */
- public function getEditMenu() {
- if (!$this->record || $this->record->isPendingDeletion()) {
- return null;
- }
-
- // edit menu
- $menu = new Menu(I18N::translate('Edit'), '#', 'menu-fam');
-
- if (Auth::isEditor($this->record->getTree())) {
- // edit_fam / members
- $menu->addSubmenu(new Menu(I18N::translate('Change family members'), '#', 'menu-fam-change', array(
- 'onclick' => 'return change_family_members("' . $this->record->getXref() . '");',
- )));
-
- // edit_fam / add child
- $menu->addSubmenu(new Menu(I18N::translate('Add a child to this family'), '#', 'menu-fam-addchil', array(
- 'onclick' => 'return add_child_to_family("' . $this->record->getXref() . '", "U");',
- )));
-
- // edit_fam / reorder_children
- if ($this->record->getNumberOfChildren() > 1) {
- $menu->addSubmenu(new Menu(I18N::translate('Re-order children'), '#', 'menu-fam-orderchil', array(
- 'onclick' => 'return reorder_children("' . $this->record->getXref() . '");',
- )));
- }
-
- // delete
- $menu->addSubmenu(new Menu(I18N::translate('Delete'), '#', 'menu-fam-del', array(
- 'onclick' => 'return delete_record("' . I18N::translate('Deleting the family will unlink all of the individuals from each other but will leave the individuals in place. Are you sure you want to delete this family?') . '", "' . $this->record->getXref() . '");',
- )));
- }
-
- // edit raw
- if (Auth::isAdmin() || Auth::isEditor($this->record->getTree()) && $this->record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the raw GEDCOM'), '#', 'menu-fam-editraw', array(
- 'onclick' => 'return edit_raw("' . $this->record->getXref() . '");',
- )));
- }
-
- return $menu;
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return string
- */
- public function getSignificantSurname() {
- if ($this->record && $this->record->getHusband()) {
- list($surn) = explode(',', $this->record->getHusband()->getSortName());
-
- return $surn;
- } else {
- return '';
- }
- }
-
- /**
- * Print the facts
- */
- public function printFamilyFacts() {
- global $linkToID;
-
- $linkToID = $this->record->getXref(); // -- Tell addmedia.php what to link to
-
- $indifacts = $this->record->getFacts();
- if ($indifacts) {
- Functions::sortFacts($indifacts);
- foreach ($indifacts as $fact) {
- FunctionsPrintFacts::printFact($fact, $this->record);
- }
- } else {
- echo '', I18N::translate('No facts exist for this family.'), ' ';
- }
-
- if (Auth::isEditor($this->record->getTree())) {
- FunctionsPrint::printAddNewFact($this->record->getXref(), $indifacts, 'FAM');
-
- echo '';
- echo I18N::translate('Note');
- echo ' ';
- echo "record->getXref() . "','NOTE');\">", I18N::translate('Add a note'), ' ';
- echo ' ';
-
- echo '';
- echo I18N::translate('Shared note');
- echo ' ';
- echo "record->getXref() . "','SHARED_NOTE');\">", I18N::translate('Add a shared note'), ' ';
- echo ' ';
-
- if ($this->record->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($this->record->getTree())) {
- echo '';
- echo I18N::translate('Media object');
- echo ' ';
- echo "record->getXref() . "', '_blank', edit_window_specs); return false;\">", I18N::translate('Add a media object'), ' ';
- echo FunctionsPrint::helpLink('OBJE');
- echo ' ';
- echo "record->getXref() . "&linkto=family', '_blank', find_window_specs); return false;\">", I18N::translate('Link to an existing media object'), ' ';
- echo ' ';
- }
-
- echo '';
- echo I18N::translate('Source');
- echo ' ';
- echo "record->getXref() . "','SOUR');\">", I18N::translate('Add a source citation'), ' ';
- echo ' ';
- }
- }
-}
diff --git a/sources/app/Controller/FanchartController.php b/sources/app/Controller/FanchartController.php
deleted file mode 100644
index 2f7df24..0000000
--- a/sources/app/Controller/FanchartController.php
+++ /dev/null
@@ -1,384 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Controller for the fan chart
- */
-class FanchartController extends ChartController {
- /** @var int Style of fanchart */
- public $fan_style;
-
- /** @var int Width of fanchart (a percentage) */
- public $fan_width;
-
- /** @var int Number of generations to display */
- public $generations;
-
- /**
- * Create the controller
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
-
- $default_generations = $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS');
-
- // Extract the request parameters
- $this->fan_style = Filter::getInteger('fan_style', 2, 4, 3);
- $this->fan_width = Filter::getInteger('fan_width', 50, 500, 100);
- $this->generations = Filter::getInteger('generations', 2, 9, $default_generations);
-
- if ($this->root && $this->root->canShowName()) {
- $this->setPageTitle(
- /* I18N: http://en.wikipedia.org/wiki/Family_tree#Fan_chart - %s is an individual’s name */
- I18N::translate('Fan chart of %s', $this->root->getFullName())
- );
- } else {
- $this->setPageTitle(I18N::translate('Fan chart'));
- }
- }
-
- /**
- * A list of options for the chart style.
- *
- * @return string[]
- */
- public function getFanStyles() {
- return array(
- 2 => /* I18N: layout option for the fan chart */ I18N::translate('half circle'),
- 3 => /* I18N: layout option for the fan chart */ I18N::translate('three-quarter circle'),
- 4 => /* I18N: layout option for the fan chart */ I18N::translate('full circle'),
- );
- }
-
- /**
- * split and center text by lines
- *
- * @param string $data input string
- * @param int $maxlen max length of each line
- *
- * @return string $text output string
- */
- public function splitAlignText($data, $maxlen) {
- $RTLOrd = array(215, 216, 217, 218, 219);
-
- $lines = explode("\n", $data);
- // more than 1 line : recursive calls
- if (count($lines) > 1) {
- $text = '';
- foreach ($lines as $line) {
- $text .= $this->splitAlignText($line, $maxlen) . "\n";
- }
-
- return $text;
- }
- // process current line word by word
- $split = explode(' ', $data);
- $text = '';
- $line = '';
-
- // do not split hebrew line
- $found = false;
- foreach ($RTLOrd as $ord) {
- if (strpos($data, chr($ord)) !== false) {
- $found = true;
- }
- }
- if ($found) {
- $line = $data;
- } else {
- foreach ($split as $word) {
- $len = strlen($line);
- $wlen = strlen($word);
- if (($len + $wlen) < $maxlen) {
- if (!empty($line)) {
- $line .= ' ';
- }
- $line .= "$word";
- } else {
- $p = max(0, (int) (($maxlen - $len) / 2));
- if (!empty($line)) {
- $line = str_repeat(' ', $p) . $line; // center alignment using spaces
- $text .= $line . "\n";
- }
- $line = $word;
- }
- }
- }
- // last line
- if (!empty($line)) {
- $len = strlen($line);
- if (in_array(ord($line{0}), $RTLOrd)) {
- $len /= 2;
- }
- $p = max(0, (int) (($maxlen - $len) / 2));
- $line = str_repeat(' ', $p) . $line; // center alignment using spaces
- $text .= $line;
- }
-
- return $text;
- }
-
- /**
- * Generate both the HTML and PNG components of the fan chart
- *
- * The HTML and PNG components both require the same co-ordinate calculations,
- * so we generate them using the same code, but we send them in separate
- * HTTP requests.
- *
- * @param string $what "png" or "html"
- *
- * @return string
- */
- public function generateFanChart($what) {
- $treeid = $this->sosaAncestors($this->generations);
- $fanw = 640 * $this->fan_width / 100;
- $fandeg = 90 * $this->fan_style;
- $html = '';
-
- $treesize = count($treeid) + 1;
-
- // generations count
- $gen = log($treesize) / log(2) - 1;
- $sosa = $treesize - 1;
-
- // fan size
- if ($fandeg == 0) {
- $fandeg = 360;
- }
- $fandeg = min($fandeg, 360);
- $fandeg = max($fandeg, 90);
- $cx = $fanw / 2 - 1; // center x
- $cy = $cx; // center y
- $rx = $fanw - 1;
- $rw = $fanw / ($gen + 1);
- $fanh = $fanw; // fan height
- if ($fandeg == 180) {
- $fanh = round($fanh * ($gen + 1) / ($gen * 2));
- }
- if ($fandeg == 270) {
- $fanh = round($fanh * 0.86);
- }
- $scale = $fanw / 640;
-
- // image init
- $image = imagecreate($fanw, $fanh);
- $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
- imagefilledrectangle($image, 0, 0, $fanw, $fanh, $white);
- imagecolortransparent($image, $white);
-
- $color = imagecolorallocate(
- $image,
- hexdec(substr(Theme::theme()->parameter('chart-font-color'), 0, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-font-color'), 2, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-font-color'), 4, 2)));
- $bgcolor = imagecolorallocate(
- $image,
- hexdec(substr(Theme::theme()->parameter('chart-background-u'), 0, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-u'), 2, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-u'), 4, 2))
- );
- $bgcolorM = imagecolorallocate(
- $image,
- hexdec(substr(Theme::theme()->parameter('chart-background-m'), 0, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-m'), 2, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-m'), 4, 2))
- );
- $bgcolorF = imagecolorallocate(
- $image,
- hexdec(substr(Theme::theme()->parameter('chart-background-f'), 0, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-f'), 2, 2)),
- hexdec(substr(Theme::theme()->parameter('chart-background-f'), 4, 2))
- );
-
- // imagemap
- $imagemap = '';
-
- // loop to create fan cells
- while ($gen >= 0) {
- // clean current generation area
- $deg2 = 360 + ($fandeg - 180) / 2;
- $deg1 = $deg2 - $fandeg;
- imagefilledarc($image, $cx, $cy, $rx, $rx, $deg1, $deg2, $bgcolor, IMG_ARC_PIE);
- $rx -= 3;
-
- // calculate new angle
- $p2 = pow(2, $gen);
- $angle = $fandeg / $p2;
- $deg2 = 360 + ($fandeg - 180) / 2;
- $deg1 = $deg2 - $angle;
- // special case for rootid cell
- if ($gen == 0) {
- $deg1 = 90;
- $deg2 = 360 + $deg1;
- }
-
- // draw each cell
- while ($sosa >= $p2) {
- $person = $treeid[$sosa];
- if ($person) {
- $name = $person->getFullName();
- $addname = $person->getAddName();
-
- $text = I18N::reverseText($name);
- if ($addname) {
- $text .= "\n" . I18N::reverseText($addname);
- }
-
- $text .= "\n" . I18N::reverseText($person->getLifeSpan());
-
- switch ($person->getSex()) {
- case 'M':
- $bg = $bgcolorM;
- break;
- case 'F':
- $bg = $bgcolorF;
- break;
- default:
- $bg = $bgcolor;
- break;
- }
-
- imagefilledarc($image, $cx, $cy, $rx, $rx, $deg1, $deg2, $bg, IMG_ARC_PIE);
-
- // split and center text by lines
- $wmax = (int) ($angle * 7 / Theme::theme()->parameter('chart-font-size') * $scale);
- $wmax = min($wmax, 35 * $scale);
- if ($gen == 0) {
- $wmax = min($wmax, 17 * $scale);
- }
- $text = $this->splitAlignText($text, $wmax);
-
- // text angle
- $tangle = 270 - ($deg1 + $angle / 2);
- if ($gen == 0) {
- $tangle = 0;
- }
-
- // calculate text position
- $deg = $deg1 + 0.44;
- if ($deg2 - $deg1 > 40) {
- $deg = $deg1 + ($deg2 - $deg1) / 11;
- }
- if ($deg2 - $deg1 > 80) {
- $deg = $deg1 + ($deg2 - $deg1) / 7;
- }
- if ($deg2 - $deg1 > 140) {
- $deg = $deg1 + ($deg2 - $deg1) / 4;
- }
- if ($gen == 0) {
- $deg = 180;
- }
- $rad = deg2rad($deg);
- $mr = ($rx - $rw / 4) / 2;
- if ($gen > 0 && $deg2 - $deg1 > 80) {
- $mr = $rx / 2;
- }
- $tx = $cx + $mr * cos($rad);
- $ty = $cy - $mr * -sin($rad);
- if ($sosa == 1) {
- $ty -= $mr / 2;
- }
-
- // print text
- imagettftext(
- $image,
- Theme::theme()->parameter('chart-font-size'),
- $tangle, $tx, $ty,
- $color, Theme::theme()->parameter('chart-font-name'),
- $text
- );
-
- $imagemap .= ' = $deg1) {
- $rad = deg2rad($deg);
- $tx = round($cx + $mr * cos($rad));
- $ty = round($cy - $mr * -sin($rad));
- $imagemap .= "$tx,$ty,";
- $deg -= ($deg2 - $deg1) / 6;
- }
- // join first point
- $mr = $rx / 2;
- $deg = $deg1;
- $rad = deg2rad($deg);
- $tx = round($cx + $mr * cos($rad));
- $ty = round($cy - $mr * -sin($rad));
- $imagemap .= "$tx,$ty";
- // add action url
- $pid = $person->getXref();
- $imagemap .= '" href="#' . $pid . '"';
- $html .= '';
- $imagemap .= ' alt="' . strip_tags($person->getFullName()) . '" title="' . strip_tags($person->getFullName()) . '">';
- }
- $deg1 -= $angle;
- $deg2 -= $angle;
- $sosa--;
- }
- $rx -= $rw;
- $gen--;
- }
-
- $imagemap .= ' ';
-
- switch ($what) {
- case 'html':
- return $html . $imagemap . ' ';
-
- case 'png':
- imagestringup($image, 1, $fanw - 10, $fanh / 3, WT_BASE_URL, $color);
- ob_start();
- imagepng($image);
- imagedestroy($image);
-
- return ob_get_clean();
-
- default:
- throw new \InvalidArgumentException(__METHOD__ . ' ' . $what);
- }
- }
-}
diff --git a/sources/app/Controller/GedcomRecordController.php b/sources/app/Controller/GedcomRecordController.php
deleted file mode 100644
index 3b2addf..0000000
--- a/sources/app/Controller/GedcomRecordController.php
+++ /dev/null
@@ -1,123 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\FlashMessages;
-use Fisharebest\Webtrees\GedcomRecord;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Media;
-use Fisharebest\Webtrees\Menu;
-use Fisharebest\Webtrees\Note;
-use Fisharebest\Webtrees\Repository;
-use Fisharebest\Webtrees\Source;
-
-/**
- * Base controller for all GedcomRecord controllers
- */
-class GedcomRecordController extends PageController {
- /**
- * A genealogy record
- *
- * @var GedcomRecord|Individual|Family|Source|Repository|Media|Note
- */
- public $record;
-
- /**
- * Startup activity
- *
- * @param GedcomRecord|null $record
- */
- public function __construct(GedcomRecord $record = null) {
- $this->record = $record;
-
- // Automatically fix broken links
- if ($this->record && $this->record->canEdit()) {
- $broken_links = 0;
- foreach ($this->record->getFacts('HUSB|WIFE|CHIL|FAMS|FAMC|REPO') as $fact) {
- if (!$fact->isPendingDeletion() && $fact->getTarget() === null) {
- $this->record->deleteFact($fact->getFactId(), false);
- FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $this->record->getFullName(), $fact->getValue()));
- $broken_links = true;
- }
- }
- foreach ($this->record->getFacts('NOTE|SOUR|OBJE') as $fact) {
- // These can be links or inline. Only delete links.
- if (!$fact->isPendingDeletion() && $fact->getTarget() === null && preg_match('/^@.*@$/', $fact->getValue())) {
- $this->record->deleteFact($fact->getFactId(), false);
- FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $this->record->getFullName(), $fact->getValue()));
- $broken_links = true;
- }
- }
- if ($broken_links) {
- // Reload the updated family
- $this->record = GedcomRecord::getInstance($this->record->getXref(), $this->record->getTree());
- }
- }
-
- parent::__construct();
-
- // We want robots to index this page
- $this->setMetaRobots('index,follow');
-
- // Set a page title
- if ($this->record) {
- if ($this->record->canShowName()) {
- // e.g. "John Doe" or "1881 Census of Wales"
- $this->setPageTitle($this->record->getFullName());
- } else {
- // e.g. "Individual" or "Source"
- $record = $this->record;
- $this->setPageTitle(GedcomTag::getLabel($record::RECORD_TYPE));
- }
- } else {
- // No such record
- $this->setPageTitle(I18N::translate('Private'));
- }
- }
-
- /**
- * get edit menu
- */
- public function getEditMenu() {
- if (!$this->record || $this->record->isPendingDeletion()) {
- return null;
- }
-
- // edit menu
- $menu = new Menu(I18N::translate('Edit'), '#', 'menu-record');
-
- // edit raw
- if (Auth::isAdmin() || Auth::isEditor($this->record->getTree()) && $this->record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the raw GEDCOM'), '#', 'menu-record-editraw', array(
- 'onclick' => 'return edit_raw("' . $this->record->getXref() . '");',
- )));
- }
-
- // delete
- if (Auth::isEditor($this->record->getTree())) {
- $menu->addSubmenu(new Menu(I18N::translate('Delete'), '#', 'menu-record-del', array(
- 'onclick' => 'return delete_record("' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeJs(Filter::unescapeHtml($this->record->getFullName()))) . '", "' . $this->record->getXref() . '");',
- )));
- }
-
- return $menu;
- }
-}
diff --git a/sources/app/Controller/HourglassController.php b/sources/app/Controller/HourglassController.php
deleted file mode 100644
index 4b95331..0000000
--- a/sources/app/Controller/HourglassController.php
+++ /dev/null
@@ -1,457 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Controller for the hourglass chart
- */
-class HourglassController extends ChartController {
- /** @var int Whether to show spouse details. */
- public $show_spouse;
-
- /** @var int Number of ascendancy generations to show. */
- public $generations;
-
- /** @var int Number of descendancy generations that exist. */
- public $dgenerations;
-
- /** @var int Half height of personbox. */
- public $bhalfheight;
-
- /** @var string An arrow that points to the start of the line */
- private $left_arrow;
-
- /** @var string An arrow that points to the end of the line. */
- private $right_arrow;
-
- /** @var bool Can the Javascript be loaded by the controller. */
- private $canLoadJS;
-
- const LINK = " ";
- const SWITCH_LINK = "%s ";
-
- /**
- * Create the hourglass controller.
- *
- * @param string $rootid
- * @param int $show_full
- * @param bool $loadJS
- */
- public function __construct($rootid = '', $show_full = 1, $loadJS = true) {
- global $WT_TREE;
-
- parent::__construct($show_full);
-
- // Extract parameters from
- $this->show_spouse = Filter::getInteger('show_spouse', 0, 1, 0);
- $this->generations = Filter::getInteger('generations', 2, $WT_TREE->getPreference('MAX_DESCENDANCY_GENERATIONS'), 3);
-
- $this->canLoadJS = $loadJS;
-
- //-- flip the arrows for RTL languages
- if (I18N::direction() === 'ltr') {
- $this->left_arrow = 'icon-larrow';
- $this->right_arrow = 'icon-rarrow';
- } else {
- $this->left_arrow = 'icon-rarrow';
- $this->right_arrow = 'icon-larrow';
- }
-
- $this->bhalfheight = (int) ($this->getBoxDimensions()->height / 2);
-
- //Checks how many generations of descendency is for the person for formatting purposes
- $this->dgenerations = $this->maxDescendencyGenerations($this->root, 0);
- if ($this->dgenerations < 1) {
- $this->dgenerations = 1;
- }
-
- $this->setPageTitle(/* I18N: %s is an individual’s name */ I18N::translate('Hourglass chart of %s', $this->root->getFullName()));
- }
-
- /**
- * Prints pedigree of the person passed in. Which is the descendancy
- *
- * @param Individual $person ID of person to print the pedigree for
- * @param int $count generation count, so it recursively calls itself
- */
- public function printPersonPedigree(Individual $person, $count) {
-
- if ($count >= $this->generations) {
- return;
- }
-
- $genoffset = $this->generations; // handle pedigree n generations lines
-
- //
- //Prints empty table columns for children w/o parents up to the max generation
- //This allows vertical line spacing to be consistent
- //
- if (count($person->getChildFamilies()) == 0) {
- echo '' . $this->printEmptyBox() . ' ';
- echo '';
- // Recursively get the father’s family
- $this->printPersonPedigree($person, $count + 1);
- echo ' ';
- echo '' . $this->printEmptyBox() . ' ';
- echo '';
- // Recursively get the mother’s family
- $this->printPersonPedigree($person, $count + 1);
- echo '
';
- }
- foreach ($person->getChildFamilies() as $family) {
- echo '';
- echo '';
- echo ' ';
- echo ' ';
- echo '';
- //-- print the father box
- FunctionsPrint::printPedigreePerson($family->getHusband(), $this->showFull());
- echo " ";
- if ($family->getHusband()) {
- $ARID = $family->getHusband()->getXref();
- echo "";
-
- //-- print an Ajax arrow on the last generation of the adult male
- if ($count == $this->generations - 1 && $family->getHusband()->getChildFamilies()) {
- printf(self::LINK, $this->right_arrow, $ARID, 'asc', $this->showFull(), $this->show_spouse);
- }
- //-- recursively get the father’s family
- $this->printPersonPedigree($family->getHusband(), $count + 1);
- echo " ";
- } else {
- echo '';
- if ($count < $genoffset - 1) {
- echo '';
- for ($i = $count; $i < (pow(2, ($genoffset - 1) - $count) / 2) + 2; $i++) {
- $this->printEmptyBox();
- echo '';
- $this->printEmptyBox();
- echo '';
- }
- echo '
';
- }
- }
- echo
- ' ',
- " ",
- ' ',
- '';
- //-- print the mother box
- FunctionsPrint::printPedigreePerson($family->getWife(), $this->showFull());
- echo ' ';
- if ($family->getWife()) {
- $ARID = $family->getWife()->getXref();
- echo '';
-
- //-- print an ajax arrow on the last generation of the adult female
- if ($count == $this->generations - 1 && $family->getWife()->getChildFamilies()) {
- printf(self::LINK, $this->right_arrow, $ARID, 'asc', $this->showFull(), $this->show_spouse);
- }
- //-- recursively print the mother’s family
- $this->printPersonPedigree($family->getWife(), $count + 1);
- echo ' ';
- }
- echo '
';
- break;
- }
- }
-
- /**
- * Print empty box
- *
- * @return string
- */
-
- private function printEmptyBox() {
- return $this->showFull() ? Theme::theme()->individualBoxEmpty() : Theme::theme()->individualBoxSmallEmpty();
- }
-
- /**
- * Prints descendency of passed in person
- *
- * @param Individual $person person to print descendency for
- * @param int $count count of generations to print
- * @param bool $showNav
- *
- * @return int
- */
- public function printDescendency($person, $count, $showNav = true) {
- global $lastGenSecondFam;
-
- if ($count > $this->dgenerations) {
- return 0;
- }
- $pid = $person->getXref();
- $tablealign = 'right';
- $otablealign = 'left';
- if (I18N::direction() === 'rtl') {
- $tablealign = 'left';
- $otablealign = 'right';
- }
-
- //-- put a space between families on the last generation
- if ($count == $this->dgenerations - 1) {
- if (isset($lastGenSecondFam)) {
- echo ' ';
- }
- $lastGenSecondFam = true;
- }
- echo "";
- echo '';
- echo "";
- $numkids = 0;
- $families = $person->getSpouseFamilies();
- $famNum = 0;
- $children = array();
- if ($count < $this->dgenerations) {
- // Put all of the children in a common array
- foreach ($families as $family) {
- $famNum++;
- foreach ($family->getChildren() as $child) {
- $children[] = $child;
- }
- }
-
- $ct = count($children);
- if ($ct > 0) {
- echo "";
- for ($i = 0; $i < $ct; $i++) {
- $person2 = $children[$i];
- $chil = $person2->getXref();
- echo '';
- echo '';
- $kids = $this->printDescendency($person2, $count + 1, $showNav);
- $numkids += $kids;
- echo ' ';
-
- // Print the lines
- if ($ct > 1) {
- if ($i == 0) {
- // First child
- echo " ";
- } elseif ($i == $ct - 1) {
- // Last child
- echo " ";
- } else {
- // Middle child
- echo ' parameter('image-spacer') . '\' width="3"> ';
- }
- }
- echo ' ';
- }
- echo '
';
- }
- echo ' ';
- echo '';
- }
-
- // Print the descendency expansion arrow
- if ($count == $this->dgenerations) {
- $numkids = 1;
- $tbwidth = $this->getBoxDimensions()->width + 16;
- for ($j = $count; $j < $this->dgenerations; $j++) {
- echo "
";
- }
- $kcount = 0;
- foreach ($families as $family) {
- $kcount += $family->getNumberOfChildren();
- }
- if ($kcount == 0) {
- echo " ";
- } else {
- printf(self::LINK, $this->left_arrow, $pid, 'desc', $this->showFull(), $this->show_spouse);
- //-- move the arrow up to line up with the correct box
- if ($this->show_spouse) {
- echo str_repeat(' ', count($families));
- }
- echo " ";
- }
- }
-
- echo '';
- FunctionsPrint::printPedigreePerson($person, $this->showFull());
- echo ' ';
-
- //----- Print the spouse
- if ($this->show_spouse) {
- foreach ($families as $family) {
- echo "";
- FunctionsPrint::printPedigreePerson($family->getSpouse($person), $this->showFull());
- $numkids++;
- echo " ";
- }
- //-- add offset divs to make things line up better
- if ($count == $this->dgenerations) {
- echo "
";
- }
- }
- echo "
";
-
- // For the root person, print a down arrow that allows changing the root of tree
- if ($showNav && $count == 1) {
- if ($person->canShowName()) {
- // -- print left arrow for decendants so that we can move down the tree
- $famids = $person->getSpouseFamilies();
- //-- make sure there is more than 1 child in the family with parents
- $cfamids = $person->getChildFamilies();
- $num = 0;
- foreach ($cfamids as $family) {
- $num += $family->getNumberOfChildren();
- }
- if ($num > 0) {
- echo '';
- echo '
';
- echo '
';
- echo '
';
-
- foreach ($famids as $family) {
- echo "" . I18N::translate('Family') . " ";
- $spouse = $family->getSpouse($person);
- if ($spouse) {
- printf(self::SWITCH_LINK, $spouse->getXref(), $this->show_spouse, $this->showFull(), $this->generations, $spouse->getFullName());
- }
- foreach ($family->getChildren() as $child) {
- printf(self::SWITCH_LINK, $child->getXref(), $this->show_spouse, $this->showFull(), $this->generations, $child->getFullName());
- }
- }
-
- //-- print the siblings
- foreach ($cfamids as $family) {
- if ($family->getHusband() || $family->getWife()) {
- echo "" . I18N::translate('Parents') . " ";
- $husb = $family->getHusband();
- if ($husb) {
- printf(self::SWITCH_LINK, $husb->getXref(), $this->show_spouse, $this->showFull(), $this->generations, $husb->getFullName());
- }
- $wife = $family->getWife();
- if ($wife) {
- printf(self::SWITCH_LINK, $wife->getXref(), $this->show_spouse, $this->showFull(), $this->generations, $wife->getFullName());
- }
- }
-
- // filter out root person from children array so only siblings remain
- $siblings = array_filter($family->getChildren(), function (Individual $item) use ($pid) {
- return $item->getXref() != $pid;
- });
- $num = count($siblings);
- if ($num) {
- echo "";
- echo $num > 1 ? I18N::translate('Siblings') : I18N::translate('Sibling');
- echo " ";
- foreach ($siblings as $child) {
- printf(self::SWITCH_LINK, $child->getXref(), $this->show_spouse, $this->showFull(), $this->generations, $child->getFullName());
- }
- }
- }
- echo '
';
- echo '
';
- echo '
';
- }
- }
- }
- echo '
';
-
- return $numkids;
- }
-
- /**
- * Calculates number of generations a person has
- *
- * @param Individual $individual Start individual
- * @param int $depth Pass in 0 and it calculates how far down descendency goes
- *
- * @return int Number of generations the descendency actually goes
- */
- private function maxDescendencyGenerations(Individual $individual, $depth) {
- if ($depth > $this->generations) {
- return $depth;
- }
- $maxdc = $depth;
- foreach ($individual->getSpouseFamilies() as $family) {
- foreach ($family->getChildren() as $child) {
- $dc = $this->maxDescendencyGenerations($child, $depth + 1);
- if ($dc >= $this->generations) {
- return $dc;
- }
- if ($dc > $maxdc) {
- $maxdc = $dc;
- }
- }
- }
-
- $maxdc++;
- if ($maxdc == 1) {
- $maxdc++;
- }
-
- return $maxdc;
- }
-
- /**
- * setup all of the javascript that is needed for the hourglass chart
- */
- public function setupJavascript() {
- $js = "
- var WT_HOURGLASS_CHART = (function() {
- function sizeLines() {
- jQuery('.tvertline').each(function(i,e) {
- var pid = e.id.split('_').pop();
- e.style.height = Math.abs(jQuery('#table_' + pid)[0].offsetHeight - (jQuery('#table2_' + pid)[0].offsetTop + {$this->bhalfheight}+5)) + 'px';
- });
-
- jQuery('.bvertline').each(function(i,e) {
- var pid = e.id.split('_').pop();
- e.style.height = jQuery('#table_' + pid)[0].offsetTop + jQuery('#table2_' + pid)[0].offsetTop + {$this->bhalfheight}+5 + 'px';
- });
-
- jQuery('.pvline').each(function(i,e) {
- var el = jQuery(e);
- el.height(Math.floor(el.parent().height()/2));
- });
- }
-
- jQuery('#childarrow').on('click', '.icon-darrow', function(e) {
- e.preventDefault();
- jQuery('#childbox').slideToggle('fast');
- })
- jQuery('.hourglassChart').on('click', '.icon-larrow, .icon-rarrow', function(e){
- e.preventDefault();
- e.stopPropagation();
- var self = jQuery(this),
- parms = self.data('parms').split('-'),
- id = self.attr('href');
- jQuery('#td_'+id).load('hourglass_ajax.php?rootid='+ id +'&generations=1&type='+parms[0]+'&show_full='+(parseInt(parms[1]) ? 1:0) +'&show_spouse='+(parseInt(parms[2]) ? 1:0), function(){
- sizeLines();
- });
- });
-
- sizeLines();
- })();
- ";
-
- if ($this->canLoadJS) {
- $this->addInlineJavascript($js);
- } else {
- return $js;
- }
- }
-}
diff --git a/sources/app/Controller/IndividualController.php b/sources/app/Controller/IndividualController.php
deleted file mode 100644
index 235c96e..0000000
--- a/sources/app/Controller/IndividualController.php
+++ /dev/null
@@ -1,421 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Database;
-use Fisharebest\Webtrees\Fact;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\FunctionsPrint;
-use Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
-use Fisharebest\Webtrees\GedcomCode\GedcomCodeName;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Menu;
-use Fisharebest\Webtrees\Module;
-use Fisharebest\Webtrees\User;
-
-/**
- * Controller for the individual page
- */
-class IndividualController extends GedcomRecordController {
- /** @var int Count of names */
- public $name_count = 0;
-
- /** @var int Count of names. */
- public $total_names = 0;
-
- /** ModuleTabInterface[] List of tabs to show */
- public $tabs;
-
- /**
- * Startup activity
- *
- * @param Individual|null $record
- */
- public function __construct($record) {
- parent::__construct($record);
-
- // If we can display the details, add them to the page header
- if ($this->record && $this->record->canShow()) {
- $this->setPageTitle($this->record->getFullName() . ' ' . $this->record->getLifeSpan());
- $this->tabs = Module::getActiveTabs($this->record->getTree());
- }
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return Individual
- */
- public function getSignificantIndividual() {
- if ($this->record) {
- return $this->record;
- }
-
- return parent::getSignificantIndividual();
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return Family
- */
- public function getSignificantFamily() {
- if ($this->record) {
- foreach ($this->record->getChildFamilies() as $family) {
- return $family;
- }
- foreach ($this->record->getSpouseFamilies() as $family) {
- return $family;
- }
- }
-
- return parent::getSignificantFamily();
- }
-
- /**
- * Handle AJAX requests - to generate the tab content
- */
- public function ajaxRequest() {
- // Search engines should not make AJAX requests
- if (Auth::isSearchEngine()) {
- http_response_code(403);
- exit;
- }
-
- // Initialise tabs
- $tab = Filter::get('module');
-
- // A request for a non-existant tab?
- if (array_key_exists($tab, $this->tabs)) {
- $mod = $this->tabs[$tab];
- } else {
- http_response_code(404);
- exit;
- }
-
- header("Content-Type: text/html; charset=UTF-8"); // AJAX calls do not have the meta tag headers and need this set
- header("X-Robots-Tag: noindex,follow"); // AJAX pages should not show up in search results, any links can be followed though
-
- echo $mod->getTabContent();
-
- if (WT_DEBUG_SQL) {
- echo Database::getQueryLog();
- }
- }
-
- /**
- * print information for a name record
- *
- * @param Fact $event the event object
- */
- public function printNameRecord(Fact $event) {
- $factrec = $event->getGedcom();
-
- // Create a dummy record, so we can extract the formatted NAME value from the event.
- $dummy = new Individual(
- 'xref',
- "0 @xref@ INDI\n1 DEAT Y\n" . $factrec,
- null,
- $event->getParent()->getTree()
- );
- $all_names = $dummy->getAllNames();
- $primary_name = $all_names[0];
-
- $this->name_count++;
- if ($this->name_count > 1) { echo '', $dummy->getFullName(), ' '; } // Other names accordion element
- echo '';
-
- echo '
';
- echo '
', I18N::translate('Name'), ' ';
- $dummy->setPrimaryName(0);
- echo '', $dummy->getFullName();
- if ($this->name_count == 1) {
- if (Auth::isAdmin()) {
- $user = User::findByGenealogyRecord($this->record);
- if ($user) {
- echo ' - ' . Filter::escapeHtml($user->getUserName()) . ' ';
- }
- }
- }
- if ($this->record->canEdit() && !$event->isPendingDeletion()) {
- echo "";
- echo "";
- }
- echo ' ';
- echo '';
- echo '
';
- $ct = preg_match_all('/\n2 (\w+) (.*)/', $factrec, $nmatch, PREG_SET_ORDER);
- for ($i = 0; $i < $ct; $i++) {
- echo '
';
- $fact = $nmatch[$i][1];
- if ($fact != 'SOUR' && $fact != 'NOTE' && $fact != 'SPFX') {
- echo '
', GedcomTag::getLabel($fact, $this->record), ' ';
- echo ''; // Before using dir="auto" on this field, note that Gecko treats this as an inline element but WebKit treats it as a block element
- if (isset($nmatch[$i][2])) {
- $name = Filter::escapeHtml($nmatch[$i][2]);
- $name = str_replace('/', '', $name);
- $name = preg_replace('/(\S*)\*/', '\\1 ', $name);
- switch ($fact) {
- case 'TYPE':
- echo GedcomCodeName::getValue($name, $this->record);
- break;
- case 'SURN':
- // The SURN field is not necessarily the surname.
- // Where it is not a substring of the real surname, show it after the real surname.
- $surname = Filter::escapeHtml($primary_name['surname']);
- if (strpos($primary_name['surname'], str_replace(',', ' ', $nmatch[$i][2])) !== false) {
- echo '' . $surname . ' ';
- } else {
- echo I18N::translate('%1$s (%2$s)', '' . $surname . ' ', '' . $name . ' ');
- }
- break;
- default:
- echo '' . $name . ' ';
- break;
- }
- }
- echo ' ';
- echo '';
- }
- echo '
';
- }
- if (preg_match("/\n2 SOUR/", $factrec)) {
- echo '
', FunctionsPrintFacts::printFactSources($factrec, 2), '
';
- }
- if (preg_match("/\n2 NOTE/", $factrec)) {
- echo '
', FunctionsPrint::printFactNotes($factrec, 2), '
';
- }
- echo '
';
- }
-
- /**
- * print information for a sex record
- *
- * @param Fact $event the Event object
- */
- public function printSexRecord(Fact $event) {
- $sex = $event->getValue();
- if (empty($sex)) {
- $sex = 'U';
- }
- echo 'canEdit()) {
- echo ' title="', I18N::translate('Male'), ' - ', I18N::translate('Edit'), '"';
- echo ' onclick="edit_record(\'' . $this->record->getXref() . '\', \'' . $event->getFactId() . '\'); return false;">';
- } else {
- echo ' title="', I18N::translate('Male'), '">';
- }
- break;
- case 'F':
- echo 'female_gender"';
- if ($event->canEdit()) {
- echo ' title="', I18N::translate('Female'), ' - ', I18N::translate('Edit'), '"';
- echo ' onclick="edit_record(\'' . $this->record->getXref() . '\', \'' . $event->getFactId() . '\'); return false;">';
- } else {
- echo ' title="', I18N::translate('Female'), '">';
- }
- break;
- default:
- echo 'unknown_gender"';
- if ($event->canEdit()) {
- echo ' title="', I18N::translateContext('unknown gender', 'Unknown'), ' - ', I18N::translate('Edit'), '"';
- echo ' onclick="edit_record(\'' . $this->record->getXref() . '\', \'' . $event->getFactId() . '\'); return false;">';
- } else {
- echo ' title="', I18N::translateContext('unknown gender', 'Unknown'), '">';
- }
- break;
- }
- echo ' ';
- }
- /**
- * get edit menu
- */
- public function getEditMenu() {
- if (!$this->record || $this->record->isPendingDeletion()) {
- return null;
- }
- // edit menu
- $menu = new Menu(I18N::translate('Edit'), '#', 'menu-indi');
-
- if (Auth::isEditor($this->record->getTree())) {
- $menu->addSubmenu(new Menu(I18N::translate('Add a name'), '#', 'menu-indi-addname', array(
- 'onclick' => 'return add_name("' . $this->record->getXref() . '");',
- )));
-
- $has_sex_record = false;
- foreach ($this->record->getFacts() as $fact) {
- if ($fact->getTag() === 'SEX' && $fact->canEdit()) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the gender'), '#', 'menu-indi-editsex', array(
- 'onclick' => 'return edit_record("' . $this->record->getXref() . '", "' . $fact->getFactId() . '");',
- )));
- $has_sex_record = true;
- break;
- }
- }
- if (!$has_sex_record) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the gender'), '#', 'menu-indi-editsex', array(
- 'onclick' => 'return add_new_record("' . $this->record->getXref() . '", "SEX");',
- )));
- }
-
- if (count($this->record->getSpouseFamilies()) > 1) {
- $menu->addSubmenu(new Menu(I18N::translate('Re-order families'), '#', 'menu-indi-orderfam', array(
- 'onclick' => 'return reorder_families("' . $this->record->getXref() . '");',
- )));
- }
-
- // delete
- $menu->addSubmenu(new Menu(I18N::translate('Delete'), '#', 'menu-indi-del', array(
- 'onclick' => 'return delete_record("' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeJs(Filter::unescapeHtml($this->record->getFullName()))) . '", "' . $this->record->getXref() . '");',
- )));
- }
-
- // edit raw
- if (Auth::isAdmin() || Auth::isEditor($this->record->getTree()) && $this->record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the raw GEDCOM'), '#', 'menu-indi-editraw', array(
- 'onclick' => 'return edit_raw("' . $this->record->getXref() . '");',
- )));
- }
-
- return $menu;
- }
-
- /**
- * get the person box stylesheet class for the given person
- *
- * @param Individual $person
- *
- * @return string returns 'person_box', 'person_boxF', or 'person_boxNN'
- */
- public function getPersonStyle($person) {
- switch ($person->getSex()) {
- case 'M':
- $class = 'person_box';
- break;
- case 'F':
- $class = 'person_boxF';
- break;
- default:
- $class = 'person_boxNN';
- break;
- }
- if ($person->isPendingDeletion()) {
- $class .= ' old';
- } elseif ($person->isPendingAddtion()) {
- $class .= ' new';
- }
-
- return $class;
- }
-
- /**
- * Get significant information from this page, to allow other pages such as
- * charts and reports to initialise with the same records
- *
- * @return string
- */
- public function getSignificantSurname() {
- if ($this->record) {
- list($surn) = explode(',', $this->record->getSortName());
-
- return $surn;
- } else {
- return '';
- }
- }
-
- /**
- * Get the contents of sidebar.
- *
- * @return string
- */
- public function getSideBarContent() {
- global $controller;
-
- $html = '';
- $active = 0;
- $n = 0;
- foreach (Module::getActiveSidebars($this->record->getTree()) as $mod) {
- if ($mod->hasSidebarContent()) {
- $html .= '';
- $html .= '' . $mod->getSidebarContent() . '
';
- // The family navigator should be opened by default
- if ($mod->getName() == 'family_nav') {
- $active = $n;
- }
- ++$n;
- }
- }
-
- if ($html) {
- $controller
- ->addInlineJavascript('
- jQuery("#sidebarAccordion").accordion({
- active:' . $active . ',
- heightStyle: "content",
- collapsible: true,
- });
- ');
-
- return '';
- } else {
- return '';
- }
- }
-
- /**
- * Get the description for the family.
- *
- * For example, "XXX's family with new wife".
- *
- * @param Family $family
- * @param Individual $individual
- *
- * @return string
- */
- public function getSpouseFamilyLabel(Family $family, Individual $individual) {
- $spouse = $family->getSpouse($individual);
- if ($spouse) {
- return
- /* I18N: %s is the spouse name */
- I18N::translate('Family with %s', $spouse->getFullName());
- } else {
- return $family->getFullName();
- }
- }
-}
diff --git a/sources/app/Controller/LifespanController.php b/sources/app/Controller/LifespanController.php
deleted file mode 100644
index 2042926..0000000
--- a/sources/app/Controller/LifespanController.php
+++ /dev/null
@@ -1,546 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\ColorGenerator;
-use Fisharebest\Webtrees\Database;
-use Fisharebest\Webtrees\Date;
-use Fisharebest\Webtrees\Date\FrenchDate;
-use Fisharebest\Webtrees\Date\GregorianDate;
-use Fisharebest\Webtrees\Date\HijriDate;
-use Fisharebest\Webtrees\Date\JalaliDate;
-use Fisharebest\Webtrees\Date\JewishDate;
-use Fisharebest\Webtrees\Date\JulianDate;
-use Fisharebest\Webtrees\Fact;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\GedcomTag;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Place;
-use Fisharebest\Webtrees\Session;
-
-/**
- * Controller for the timeline chart
- */
-class LifespanController extends PageController {
- // Base color parameters
- const RANGE = 120; // degrees
- const SATURATION = 100; // percent
- const LIGHTNESS = 30; // percent
- const ALPHA = 0.25;
- const CHART_TOP = 10; // pixels
- const BAR_SPACING = 22; // pixels
- const YEAR_SPAN = 10; // Number of years per scale section
- const PIXELS_PER_YEAR = 7; // Number of pixels to shift per year
- const SESSION_DATA = 'lifespan_data';
-
- /** @var string|null Chart parameter */
- public $place = null;
-
- /** @var int|null Chart parameter */
- public $beginYear = null;
-
- /** @var int|null Chart parameter */
- public $endYear = null;
-
- /** @var string Chart parameter */
- public $subtitle = ' ';
-
- /** @var Individual[] A list of individuals to display. */
- private $people = array();
-
- /** @var string The default calendar to use. */
- private $defaultCalendar;
-
- /** @var string Which calendar to use. */
- private $calendar;
-
- /** @var string Which calendar escape to use. */
- private $calendarEscape;
-
- /** @var int The earliest year to show. */
- private $timelineMinYear;
-
- /** @var int That latest year to show. */
- private $timelineMaxYear;
-
- /** @var int The current year. */
- private $currentYear;
-
- /** @var string[] A list of colors to use. */
- private $colors = array();
-
- /** @todo This attribute is public to support the PHP5.3 closure workaround. */
- /** @var Place|null A place to serarh. */
- public $place_obj = null;
-
- /** @todo This attribute is public to support the PHP5.3 closure workaround. */
- /** @var Date|null Start of the date range. */
- public $startDate = null;
-
- /** @todo This attribute is public to support the PHP5.3 closure workaround. */
- /** @var Date|null End of the date range. */
- public $endDate = null;
-
- /** @var bool Only match dates in the chosen calendar. */
- private $strictDate;
-
- /** @todo This attribute is public to support the PHP5.3 closure workaround. */
- /** @var string[] List of facts/events to include. */
- public $facts;
-
- /** @var string[] Facts and events to exclude from the chart */
- private $nonfacts = array(
- 'FAMS', 'FAMC', 'MAY', 'BLOB', 'OBJE', 'SEX', 'NAME', 'SOUR', 'NOTE', 'BAPL', 'ENDL',
- 'SLGC', 'SLGS', '_TODO', '_WT_OBJE_SORT', 'CHAN', 'HUSB', 'WIFE', 'CHIL', 'OCCU', 'ASSO',
- );
-
- /**
- * Startup activity
- */
- public function __construct() {
- global $WT_TREE;
-
- parent::__construct();
- $this->setPageTitle(I18N::translate('Lifespans'));
-
- $this->facts = explode('|', WT_EVENTS_BIRT . '|' . WT_EVENTS_DEAT . '|' . WT_EVENTS_MARR . '|' . WT_EVENTS_DIV);
- $tmp = explode('\\', get_class(I18N::defaultCalendar()));
- $cal = strtolower(array_pop($tmp));
- $this->defaultCalendar = str_replace('calendar', '', $cal);
- $filterPids = false;
-
- // Request parameters
- $clear = Filter::getBool('clear');
- $newpid = Filter::get('newpid', WT_REGEX_XREF);
- $addfam = Filter::getBool('addFamily');
- $this->place = Filter::get('place');
- $this->beginYear = Filter::getInteger('beginYear', 0, PHP_INT_MAX, null);
- $this->endYear = Filter::getInteger('endYear', 0, PHP_INT_MAX, null);
- $this->calendar = Filter::get('calendar', null, $this->defaultCalendar);
- $this->strictDate = Filter::getBool('strictDate');
-
- // Set up base color parameters
- $this->colors['M'] = new ColorGenerator(240, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE * -1);
- $this->colors['F'] = new ColorGenerator(000, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE);
-
- // Build a list of people based on the input parameters
- if ($clear) {
- // Empty list & reset form
- $xrefs = array();
- $this->place = null;
- $this->beginYear = null;
- $this->endYear = null;
- $this->calendar = $this->defaultCalendar;
- } elseif ($this->place) {
- // Get all individual & family records found for a place
- $this->place_obj = new Place($this->place, $WT_TREE);
- $xrefs = Database::prepare(
- "SELECT DISTINCT `i_id` FROM `##placelinks`" .
- " JOIN `##individuals` ON `pl_gid`=`i_id` AND `pl_file`=`i_file`" .
- " WHERE `i_file`=:tree_id" .
- " AND `pl_p_id`=:place_id" .
- " UNION" .
- " SELECT DISTINCT `f_id` FROM `##placelinks`" .
- " JOIN `##families` ON `pl_gid`=`f_id` AND `pl_file`=`f_file`" .
- " WHERE `f_file`=:tree_id" .
- " AND `pl_p_id`=:place_id"
- )->execute(array(
- 'tree_id' => $WT_TREE->getTreeId(),
- 'place_id' => $this->place_obj->getPlaceId(),
- ))->fetchOneColumn();
- } else {
- // Modify an existing list of records
- $xrefs = Session::get(self::SESSION_DATA, array());
- if ($newpid) {
- $xrefs = array_merge($xrefs, $this->addFamily(Individual::getInstance($newpid, $WT_TREE), $addfam));
- $xrefs = array_unique($xrefs);
- } elseif (!$xrefs) {
- $xrefs = $this->addFamily($this->getSignificantIndividual(), false);
- }
- }
-
- $tmp = $this->getCalendarDate(unixtojd());
- $this->currentYear = $tmp->today()->y;
-
- $tmp = strtoupper(strtr($this->calendar, array(
- 'jewish' => 'hebrew',
- 'french' => 'french r',
- )));
- $this->calendarEscape = sprintf('@#D%s@', $tmp);
-
- if ($xrefs) {
- // ensure date ranges are valid in preparation for filtering list
- if ($this->beginYear || $this->endYear) {
- $filterPids = true;
- if (!$this->beginYear) {
- $tmp = new Date($this->calendarEscape . ' 1');
- $this->beginYear = $tmp->minimumDate()->y;
- }
- if (!$this->endYear) {
- $this->endYear = $this->currentYear;
- }
- $this->startDate = new Date($this->calendarEscape . $this->beginYear);
- $this->endDate = new Date($this->calendarEscape . $this->endYear);
- }
-
- // Test each xref to see if the search criteria are met
- foreach ($xrefs as $key => $xref) {
- $valid = false;
- $person = Individual::getInstance($xref, $WT_TREE);
- if ($person) {
- if ($person->canShow()) {
- foreach ($person->getFacts() as $fact) {
- if ($this->checkFact($fact)) {
- $this->people[] = $person;
- $valid = true;
- break;
- }
- }
- }
- } else {
- $family = Family::getInstance($xref, $WT_TREE);
- if ($family && $family->canShow() && $this->checkFact($family->getMarriage())) {
- $valid = true;
- $this->people[] = $family->getHusband();
- $this->people[] = $family->getWife();
- }
- }
- if (!$valid) {
- unset($xrefs[$key]); // no point in storing a xref if we can't use it
- }
- }
- Session::put(self::SESSION_DATA, $xrefs);
- } else {
- Session::forget(self::SESSION_DATA);
- }
-
- $this->people = array_filter(array_unique($this->people));
- $count = count($this->people);
- if ($count) {
- // Build the subtitle
- if ($this->place && $filterPids) {
- $this->subtitle = I18N::plural(
- '%s individual with events in %s between %s and %s',
- '%s individuals with events in %s between %s and %s',
- $count, I18N::number($count),
- $this->place, $this->startDate->display(false, '%Y'), $this->endDate->display(false, '%Y')
- );
- } elseif ($this->place) {
- $this->subtitle = I18N::plural(
- '%s individual with events in %s',
- '%s individuals with events in %s',
- $count, I18N::number($count),
- $this->place
- );
- } elseif ($filterPids) {
- $this->subtitle = I18N::plural(
- '%s individual with events between %s and %s',
- '%s individuals with events between %s and %s',
- $count, I18N::number($count),
- $this->startDate->display(false, '%Y'), $this->endDate->display(false, '%Y')
- );
- } else {
- $this->subtitle = I18N::plural(
- '%s individual',
- '%s individuals',
- $count, I18N::number($count));
- }
-
- // Sort the array in order of birth year
- usort($this->people, function (Individual $a, Individual $b) {
- return Date::compare($a->getEstimatedBirthDate(), $b->getEstimatedBirthDate());
- });
-
- //Find the mimimum birth year and maximum death year from the individuals in the array.
- $bdate = $this->getCalendarDate($this->people[0]->getEstimatedBirthDate()->minimumJulianDay());
- $minyear = $bdate->y;
-
- $that = $this; // PHP5.3 cannot access $this inside a closure
- $maxyear = array_reduce($this->people, function ($carry, Individual $item) use ($that) {
- $date = $that->getCalendarDate($item->getEstimatedDeathDate()->maximumJulianDay());
-
- return max($carry, $date->y);
- }, 0);
- } elseif ($filterPids) {
- $minyear = $this->endYear;
- $maxyear = $this->endYear;
- } else {
- $minyear = $this->currentYear;
- $maxyear = $this->currentYear;
- }
-
- $maxyear = min($maxyear, $this->currentYear); // Limit maximum year to current year as we can't forecast the future
- $minyear = min($minyear, $maxyear - $WT_TREE->getPreference('MAX_ALIVE_AGE')); // Set default minimum chart length
-
- $this->timelineMinYear = (int) floor($minyear / 10) * 10; // round down to start of the decade
- $this->timelineMaxYear = (int) ceil($maxyear / 10) * 10; // round up to start of next decade
- }
-
- /**
- * Add a person (and optionally their immediate family members) to the pids array
- *
- * @param Individual $person
- * @param bool $add_family
- *
- * @return array
- */
- private function addFamily(Individual $person, $add_family) {
- $xrefs = array();
- $xrefs[] = $person->getXref();
- if ($add_family) {
- foreach ($person->getSpouseFamilies() as $family) {
- $spouse = $family->getSpouse($person);
- if ($spouse) {
- $xrefs[] = $spouse->getXref();
- foreach ($family->getChildren() as $child) {
- $xrefs[] = $child->getXref();
- }
- }
- }
- foreach ($person->getChildFamilies() as $family) {
- foreach ($family->getSpouses() as $parent) {
- $xrefs[] = $parent->getXref();
- }
- foreach ($family->getChildren() as $sibling) {
- if ($person !== $sibling) {
- $xrefs[] = $sibling->getXref();
- }
- }
- }
- }
-
- return $xrefs;
- }
-
- /**
- * Prints the time line scale
- */
- public function printTimeline() {
- $startYear = $this->timelineMinYear;
- while ($startYear < $this->timelineMaxYear) {
- $date = new Date($this->calendarEscape . $startYear);
- echo $date->display(false, '%Y', false);
- $startYear += self::YEAR_SPAN;
- }
- }
-
- /**
- * Populate the timeline
- *
- * @return int
- */
- public function fillTimeline() {
- $rows = array();
- $maxY = self::CHART_TOP;
- //base case
- if (!$this->people) {
- return $maxY;
- }
-
- foreach ($this->people as $person) {
-
- $bdate = $this->getCalendarDate($person->getEstimatedBirthDate()->minimumJulianDay());
- $ddate = $this->getCalendarDate($person->getEstimatedDeathDate()->maximumJulianDay());
- $birthYear = $bdate->y;
- $age = min($ddate->y, $this->currentYear) - $birthYear; // truncate the bar at the current year
- $width = max(9, $age * self::PIXELS_PER_YEAR); // min width is width of sex icon
- $startPos = ($birthYear - $this->timelineMinYear) * self::PIXELS_PER_YEAR;
-
- //-- calculate a good Y top value
- $Y = self::CHART_TOP;
- $ready = false;
- while (!$ready) {
- if (!isset($rows[$Y])) {
- $ready = true;
- $rows[$Y]['x1'] = $startPos;
- $rows[$Y]['x2'] = $startPos + $width;
- } else {
- if ($rows[$Y]['x1'] > $startPos + $width) {
- $ready = true;
- $rows[$Y]['x1'] = $startPos;
- } elseif ($rows[$Y]['x2'] < $startPos) {
- $ready = true;
- $rows[$Y]['x2'] = $startPos + $width;
- } else {
- //move down a line
- $Y += self::BAR_SPACING;
- }
- }
- }
-
- $facts = $person->getFacts();
- foreach ($person->getSpouseFamilies() as $family) {
- foreach ($family->getFacts() as $fact) {
- $facts[] = $fact;
- }
- }
- Functions::sortFacts($facts);
-
- $that = $this; // PHP5.3 cannot access $this inside a closure
- $acceptedFacts = array_filter($facts, function (Fact $fact) use ($that) {
- return
- (in_array($fact->getTag(), $that->facts) && $fact->getDate()->isOK()) ||
- (($that->place_obj || $that->startDate) && $that->checkFact($fact));
- });
-
- $eventList = array();
- foreach ($acceptedFacts as $fact) {
- $tag = $fact->getTag();
- //-- if the fact is a generic EVENt then get the qualifying TYPE
- if ($tag == "EVEN") {
- $tag = $fact->getAttribute('TYPE');
- }
- $eventList[] = array(
- 'label' => GedcomTag::getLabel($tag),
- 'date' => $fact->getDate()->display(),
- 'place' => $fact->getPlace()->getFullName(),
- );
- }
- $direction = I18N::direction() === 'ltr' ? 'left' : 'right';
- $lifespan = ' ' . $person->getLifeSpan(); // put the space here so its included in the length calcs
- $sex = $person->getSex();
- $popupClass = strtr($sex, array('M' => '', 'U' => 'NN'));
- $color = $sex === 'U' ? '' : sprintf("background-color: %s", $this->colors[$sex]->getNextColor());
-
- // following lines are a nasty method of approximating
- // the width of a string in pixels from the character count
- $name_length = mb_strlen(strip_tags($person->getFullName())) * 6.5;
- $short_name_length = mb_strlen(strip_tags($person->getShortName())) * 6.5;
- $lifespan_length = mb_strlen(strip_tags($lifespan)) * 6.5;
-
- if ($width > $name_length + $lifespan_length) {
- $printName = $person->getFullName();
- $abbrLifespan = $lifespan;
- } elseif ($width > $name_length) {
- $printName = $person->getFullName();
- $abbrLifespan = '…';
- } elseif ($width > $short_name_length) {
- $printName = $person->getShortName();
- $abbrLifespan = '';
- } else {
- $printName = '';
- $abbrLifespan = '';
- }
-
- // Bar framework
- printf('
-
-
%s %s %s
- ' . // class="popup"
- '
' . // class="itr"
- '
'; // class=$popupclass
-
- $maxY = max($maxY, $Y);
- }
-
- return $maxY;
- }
-
- /**
- * Function checkFact
- *
- * Does this fact meet the search criteria?
- *
- * @todo This function is public to support the PHP5.3 closure workaround.
- *
- * @param Fact $fact
- *
- * @return bool
- */
- public function checkFact(Fact $fact) {
- $valid = !in_array($fact->getTag(), $this->nonfacts);
- if ($valid && $this->place_obj) {
- $valid = stripos($fact->getPlace()->getGedcomName(), $this->place_obj->getGedcomName()) !== false;
- }
- if ($valid && $this->startDate) {
- if ($this->strictDate && $this->calendar !== $this->defaultCalendar) {
- $valid = stripos($fact->getAttribute('DATE'), $this->calendar) !== false;
- }
- if ($valid) {
- $date = $fact->getDate();
- $valid = $date->isOK() && Date::compare($date, $this->startDate) >= 0 && Date::compare($date, $this->endDate) <= 0;
- }
- }
-
- return $valid;
- }
-
- /**
- * Function getCalendarDate
- *
- * @todo This function is public to support the PHP5.3 closure workaround.
- *
- * @param int $date
- *
- * @return object
- */
- public function getCalendarDate($date) {
- switch ($this->calendar) {
- case 'julian':
- $caldate = new JulianDate($date);
- break;
- case 'french':
- $caldate = new FrenchDate($date);
- break;
- case 'jewish':
- $caldate = new JewishDate($date);
- break;
- case 'hijri':
- $caldate = new HijriDate($date);
- break;
- case 'jalali':
- $caldate = new JalaliDate($date);
- break;
- default:
- $caldate = new GregorianDate($date);
- }
-
- return $caldate;
- }
-
- /**
- * Function getCalendarOptionList
- *
- * @return string
- */
- public function getCalendarOptionList() {
- $html = '';
- foreach (Date::calendarNames() as $calendar => $name) {
- $selected = $this->calendar === $calendar ? 'selected' : '';
- $html .= sprintf('%s ', $calendar, $selected, $name);
- }
-
- return $html;
- }
-}
diff --git a/sources/app/Controller/MediaController.php b/sources/app/Controller/MediaController.php
deleted file mode 100644
index f1d50fd..0000000
--- a/sources/app/Controller/MediaController.php
+++ /dev/null
@@ -1,141 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Fact;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Media;
-use Fisharebest\Webtrees\Menu;
-use Fisharebest\Webtrees\Module;
-
-/**
- * Controller for the media page
- */
-class MediaController extends GedcomRecordController {
- /**
- * get edit menu
- */
- public function getEditMenu() {
- if (!$this->record || $this->record->isPendingDeletion()) {
- return null;
- }
-
- // edit menu
- $menu = new Menu(I18N::translate('Edit'), '#', 'menu-obje');
-
- if (Auth::isEditor($this->record->getTree())) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the media object'), '#', 'menu-obje-edit', array(
- 'onclick' => 'window.open("addmedia.php?action=editmedia&pid=' . $this->record->getXref() . '", "_blank", edit_window_specs)',
- )));
-
- // main link displayed on page
- if (Module::getModuleByName('GEDFact_assistant')) {
- $menu->addSubmenu(new Menu(I18N::translate('Manage the links'), '#', 'menu-obje-link', array(
- 'onclick' => 'return ilinkitem("' . $this->record->getXref() . '","manage");',
- )));
- } else {
- $menu->addSubmenu(new Menu(I18N::translate('Link this media object to an individual'), '#', 'menu-obje-link-indi', array(
- 'onclick' => 'return ilinkitem("' . $this->record->getXref() . '","person");',
- )));
-
- $menu->addSubmenu(new Menu(I18N::translate('Link this media object to a family'), '#', 'menu-obje-link-fam', array(
- 'onclick' => 'return ilinkitem("' . $this->record->getXref() . '","family");',
- )));
-
- $menu->addSubmenu(new Menu(I18N::translate('Link this media object to a source'), '#', 'menu-obje-link-sour', array(
- 'onclick' => 'return ilinkitem("' . $this->record->getXref() . '","source");',
- )));
- }
-
- // delete
- $menu->addSubmenu(new Menu(I18N::translate('Delete'), '#', 'menu-obje-del', array(
- 'onclick' => 'return delete_record("' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeJs(Filter::unescapeHtml($this->record->getFullName()))) . '", "' . $this->record->getXref() . '");',
- )));
- }
-
- // edit raw
- if (Auth::isAdmin() || Auth::isEditor($this->record->getTree()) && $this->record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the raw GEDCOM'), '#', 'menu-obje-editraw', array(
- 'onclick' => 'return edit_raw("' . $this->record->getXref() . '");',
- )));
- }
-
- return $menu;
- }
-
- /**
- * Return a list of facts
- *
- * @return Fact[]
- */
- public function getFacts() {
- $facts = $this->record->getFacts();
-
- // Add some dummy facts to show additional information
- if ($this->record->fileExists()) {
- // get height and width of image, when available
- $imgsize = $this->record->getImageAttributes();
- if (!empty($imgsize['WxH'])) {
- $facts[] = new Fact('1 __IMAGE_SIZE__ ' . $imgsize['WxH'], $this->record, 0);
- }
- //Prints the file size
- $facts[] = new Fact('1 __FILE_SIZE__ ' . $this->record->getFilesize(), $this->record, 0);
- }
-
- Functions::sortFacts($facts);
-
- return $facts;
- }
-
- /**
- * Edit menu items used in media list
- *
- * @param Media $mediaobject
- *
- * @return string
- */
- public static function getMediaListMenu(Media $mediaobject) {
- $html = '';
-
- $menu = new Menu(I18N::translate('Edit the details'), '#', 'lb-image_edit', array(
- 'onclick' => 'return window.open("addmedia.php?action=editmedia&pid=' . $mediaobject->getXref() . '", "_blank", edit_window_specs);',
- ));
- $html .= '';
-
- $menu = new Menu(I18N::translate('Manage the links'), '#', 'lb-image_link', array(
- 'onclick' => 'return false;',
- ), array(
- new Menu(I18N::translate('Link this media object to an individual'), '#', '', array(
- 'onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","person");',
- )),
- new Menu(I18N::translate('Link this media object to a family'), '#', '', array(
- 'onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","family");',
- )),
- new Menu(I18N::translate('Link this media object to a source'), '#', '', array(
- 'onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","source");',
- )),
- ));
- $html .= '';
-
- $menu = new Menu(I18N::translate('View the details'), $mediaobject->getHtmlUrl(), 'lb-image_view');
- $html .= '';
-
- return '';
- }
-}
diff --git a/sources/app/Controller/NoteController.php b/sources/app/Controller/NoteController.php
deleted file mode 100644
index c8fd735..0000000
--- a/sources/app/Controller/NoteController.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Menu;
-
-/**
- * Controller for the shared note page
- */
-class NoteController extends GedcomRecordController {
- /**
- * get edit menu
- */
- public function getEditMenu() {
- if (!$this->record || $this->record->isPendingDeletion()) {
- return null;
- }
-
- // edit menu
- $menu = new Menu(I18N::translate('Edit'), '#', 'menu-note');
-
- if (Auth::isEditor($this->record->getTree())) {
- $menu->addSubmenu(new Menu(I18N::translate('Edit the note'), '#', 'menu-note-edit', array(
- 'onclick' => 'return edit_note("' . $this->record->getXref() . '");',
- )));
-
- // delete
- $menu->addSubmenu(new Menu(I18N::translate('Delete'), '#', 'menu-note-del', array(
- 'onclick' => 'return delete_record("' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeJs(Filter::unescapeHtml($this->record->getFullName()))) . '", "' . $this->record->getXref() . '");',
- )));
- }
-
- return $menu;
- }
-}
diff --git a/sources/app/Controller/PageController.php b/sources/app/Controller/PageController.php
deleted file mode 100644
index 80512c3..0000000
--- a/sources/app/Controller/PageController.php
+++ /dev/null
@@ -1,251 +0,0 @@
-.
- */
-namespace Fisharebest\Webtrees\Controller;
-
-use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\Database;
-use Fisharebest\Webtrees\Family;
-use Fisharebest\Webtrees\Filter;
-use Fisharebest\Webtrees\Functions\Functions;
-use Fisharebest\Webtrees\I18N;
-use Fisharebest\Webtrees\Individual;
-use Fisharebest\Webtrees\Theme;
-
-/**
- * Controller for full-page, themed HTML responses
- */
-class PageController extends BaseController {
- /** @var string Most pages are not intended for robots */
- private $meta_robots = 'noindex,nofollow';
-
- /** @var string $page_title */
- private $page_title = WT_WEBTREES;
-
- /** @var bool Is this a popup window? */
- private $popup;
-
- /**
- * What should this page show in the browser’s title bar?
- *
- * @param string $page_title
- *
- * @return $this
- */
- public function setPageTitle($page_title) {
- $this->page_title = $page_title;
-
- return $this;
- }
-
- /**
- * Some pages will want to display this as $page_title
- *
- * @return string
- */
- public function getPageTitle() {
- return $this->page_title;
- }
-
- /**
- * Should robots index this page?
- *
- * @param string $meta_robots
- *
- * @return $this
- */
- public function setMetaRobots($meta_robots) {
- $this->meta_robots = $meta_robots;
-
- return $this;
- }
-
- /**
- * Should robots index this page?
- *
- * @return string
- */
- public function getMetaRobots() {
- return $this->meta_robots;
- }
-
- /**
- * Restrict access
- *
- * @param bool $condition
- *
- * @return $this
- */
- public function restrictAccess($condition) {
- if ($condition !== true) {
- header('Location: ' . WT_LOGIN_URL . '?url=' . rawurlencode(Functions::getQueryUrl()));
- exit;
- }
-
- return $this;
- }
-
- /**
- * Print the page footer, using the theme
- */
- public function pageFooter() {
- echo
- Theme::theme()->footerContainer() .
- '' .
- '' .
- '' .
- '' .
- $this->getJavascript() .
- Theme::theme()->hookFooterExtraJavascript() .
- (WT_DEBUG_SQL ? Database::getQueryLog() : '') .
- '