From ddb2811bbf06dd8f9870a11534e059d7290d016f Mon Sep 17 00:00:00 2001 From: fisharebest Date: Fri, 30 Aug 2013 14:50:12 +0100 Subject: #1218624 - Interactive tree event sequence - dev / do not abbreviate chart labels --- addmedia.php | 2 - admin_pgv_to_wt.php | 3 +- admin_trees_config.php | 9 - expand_view.php | 18 +- help_text.php | 7 +- includes/functions/functions.php | 3 +- includes/functions/functions_charts.php | 2 +- includes/functions/functions_print.php | 9 +- library/WT/Controller/Ancestry.php | 6 +- library/WT/Controller/Descendancy.php | 4 +- library/WT/Controller/Lifespan.php | 23 +- library/WT/Fact.php | 65 ++-- library/WT/Gedcom/Tag.php | 14 +- library/WT/GedcomRecord.php | 11 +- library/WT/Individual.php | 10 +- library/WT/Report/Base.php | 25 +- library/WT/Tree.php | 1 - modules_v3/GEDFact_assistant/CENS_ctrl.php | 2 +- modules_v3/GEDFact_assistant/MEDIA_ctrl.php | 2 +- .../_CENS/census_3_search_add.php | 1 - .../GEDFact_assistant/_MEDIA/media_1_ctrl.php | 1 - modules_v3/GEDFact_assistant/module.php | 2 +- modules_v3/ahnentafel_report/report.xml | 6 +- modules_v3/cemetery_report/report.xml | 4 +- modules_v3/change_report/report.xml | 2 +- modules_v3/death_report/report.xml | 2 +- modules_v3/descendancy_report/report.xml | 6 +- modules_v3/fact_sources/report.xml | 26 +- modules_v3/family_group_report/report.xml | 24 +- modules_v3/missing_facts_report/report.xml | 98 ++--- modules_v3/occupation_report/report.xml | 12 +- modules_v3/pedigree_report/report.xml | 424 ++++++++++----------- modules_v3/relative_ext_report/report.xml | 4 +- modules_v3/relatives/module.php | 8 +- modules_v3/tree/class_treeview.php | 15 +- reportengine.php | 3 +- 36 files changed, 397 insertions(+), 457 deletions(-) diff --git a/addmedia.php b/addmedia.php index f31086940b..d12d06b28b 100644 --- a/addmedia.php +++ b/addmedia.php @@ -723,8 +723,6 @@ if (WT_USER_IS_ADMIN) { echo ""; } echo WT_I18N::translate('Do not update the “last change” record'), help_link('no_update_CHAN'), '
'; - //$event = new WT_Fact(get_sub_record(1, '1 CHAN', $gedrec), null, 0); - //echo format_fact_date($event, new WT_Individual(''), false, true); echo ''; } echo ''; diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php index 0e47d7303a..9e77a75002 100644 --- a/admin_pgv_to_wt.php +++ b/admin_pgv_to_wt.php @@ -646,7 +646,6 @@ foreach ($GEDCOMS as $GEDCOM=>$GED_DATA) { $stmt_gedcom_setting=WT_DB::prepare("INSERT INTO `##gedcom_setting` (gedcom_id, setting_name, setting_value) VALUES (?,?,?)"); - $stmt_gedcom_setting->execute(array($GED_DATA['id'], 'ABBREVIATE_CHART_LABELS', $ABBREVIATE_CHART_LABELS)); $stmt_gedcom_setting->execute(array($GED_DATA['id'], 'ADVANCED_NAME_FACTS', $ADVANCED_NAME_FACTS)); $stmt_gedcom_setting->execute(array($GED_DATA['id'], 'ADVANCED_PLAC_FACTS', $ADVANCED_PLAC_FACTS)); $stmt_gedcom_setting->execute(array($GED_DATA['id'], 'ALLOW_THEME_DROPDOWN', $ALLOW_THEME_DROPDOWN)); @@ -1057,4 +1056,4 @@ WT_DB::exec("COMMIT"); echo '
'; echo '

', WT_I18N::translate('You need to login again, using your PhpGedView username and password.'), '

'; -echo ''; \ No newline at end of file +echo ''; diff --git a/admin_trees_config.php b/admin_trees_config.php index 66f3e1758a..33030686ab 100644 --- a/admin_trees_config.php +++ b/admin_trees_config.php @@ -67,7 +67,6 @@ case 'add': header('Location: '.WT_SERVER_NAME.WT_SCRIPT_PATH.WT_SCRIPT_NAME.'#privacy'); exit; case 'update': - set_gedcom_setting(WT_GED_ID, 'ABBREVIATE_CHART_LABELS', WT_Filter::postBool('NEW_ABBREVIATE_CHART_LABELS')); set_gedcom_setting(WT_GED_ID, 'ADVANCED_NAME_FACTS', WT_Filter::post('NEW_ADVANCED_NAME_FACTS')); set_gedcom_setting(WT_GED_ID, 'ADVANCED_PLAC_FACTS', WT_Filter::post('NEW_ADVANCED_PLAC_FACTS')); set_gedcom_setting(WT_GED_ID, 'ALLOW_THEME_DROPDOWN', WT_Filter::postBool('NEW_ALLOW_THEME_DROPDOWN')); @@ -930,14 +929,6 @@ if (count(WT_Tree::getAll())==1) { //Removed because it doesn't work here for mu - - - - - - - - diff --git a/expand_view.php b/expand_view.php index cd0e553c52..f5ac1caef4 100644 --- a/expand_view.php +++ b/expand_view.php @@ -77,23 +77,7 @@ foreach ($facts as $event) { break; default: // Simple version of print_fact() - echo '
'; - echo '', $event->getLabel(), ' '; - $details=$event->getValue(); - if ($details!='Y' && $details!='N') { - echo '', $details, ''; - } - echo format_fact_date($event, $person, false, false); - // Show spouse/family for family events - if ($event->getParent() instanceof WT_Family) { - $spouse = $event->getParent()->getSpouse($person); - if ($spouse) { - echo ' ', $spouse->getFullName(), ' - '; - echo '', WT_I18N::translate('View family'), ' - '; - } - } - echo ' ',format_fact_place($event, true, true); - echo '
'; + echo $event->summary(); break; } } diff --git a/help_text.php b/help_text.php index f55275ac3f..291a84c1a7 100644 --- a/help_text.php +++ b/help_text.php @@ -402,11 +402,6 @@ case '_PRIM': // This section contains an entry for every configuration item ////////////////////////////////////////////////////////////////////////////// -case 'ABBREVIATE_CHART_LABELS': - $title=WT_I18N::translate('Abbreviate chart labels'); - $text=WT_I18N::translate('This option controls whether or not to abbreviate labels like Birth on charts with just the first letter like B.'); - break; - case 'ADVANCED_NAME_FACTS': $title=WT_I18N::translate('Advanced name facts'); $text=WT_I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown on the add/edit name form. If you use non-Latin alphabets such as Hebrew, Greek, Cyrillic or Arabic, you may want to add tags such as _HEB, ROMN, FONE, etc. to allow you to store names in several different alphabets.'); @@ -1514,4 +1509,4 @@ default: $controller->pageHeader(); echo '
', $title, '
'; -echo '
', $text,'
'; \ No newline at end of file +echo '
', $text,'
'; diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 0690b4ee25..7bee40dbab 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -105,7 +105,6 @@ function file_upload_error_text($error_code) { function load_gedcom_settings($ged_id=WT_GED_ID) { // Load the configuration settings into global scope // TODO: some of these are used infrequently - just load them when we need them - global $ABBREVIATE_CHART_LABELS; $ABBREVIATE_CHART_LABELS =get_gedcom_setting($ged_id, 'ABBREVIATE_CHART_LABELS'); global $ADVANCED_NAME_FACTS; $ADVANCED_NAME_FACTS =get_gedcom_setting($ged_id, 'ADVANCED_NAME_FACTS'); global $ADVANCED_PLAC_FACTS; $ADVANCED_PLAC_FACTS =get_gedcom_setting($ged_id, 'ADVANCED_PLAC_FACTS'); global $CALENDAR_FORMAT; $CALENDAR_FORMAT =get_gedcom_setting($ged_id, 'CALENDAR_FORMAT'); @@ -1948,4 +1947,4 @@ function expand_urls($text) { // Use it to emulate the before_needle php 5.3.0 strstr function function strstrb($haystack, $needle){ return substr($haystack, 0, strpos($haystack, $needle)); -} \ No newline at end of file +} diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php index 7120e74a5b..6760d9b44f 100644 --- a/includes/functions/functions_charts.php +++ b/includes/functions/functions_charts.php @@ -157,7 +157,7 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='', foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) { echo ''; echo str_repeat(' ', 10); - $fact->print_simple_fact(); + echo $fact->summary(); echo ''; } } diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index 6ea8a1b962..682b92bda9 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -40,7 +40,6 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $GEDCOM; global $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_PEDIGREE_PLACES; global $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT; - global $ABBREVIATE_CHART_LABELS; global $chart_style, $box_width, $generations, $show_spouse, $show_full; global $CHART_BOX_TAGS, $SHOW_LDS_AT_GLANCE, $PEDIGREE_SHOW_GENDER; global $SEARCH_SPIDER; @@ -179,7 +178,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { if (!in_array($birttag, $opt_tags)) { $event = $person->getFirstFact($birttag); if ($event && ($event->getDate()->isOK() || $event->getPlace())) { - $BirthDeath .= $event->print_simple_fact(true); + $BirthDeath .= $event->summary(); break; } } @@ -189,7 +188,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { if (!preg_match('/^('.WT_EVENTS_DEAT.')$/', $tag)) { $event = $person->getFirstFact($tag); if (!is_null($event)) { - $BirthDeath .= $event->print_simple_fact(true); + $BirthDeath .= $event->summary(); unset ($opt_tags[$key]); } } @@ -198,7 +197,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { foreach (explode('|', WT_EVENTS_DEAT) as $deattag) { $event = $person->getFirstFact($deattag); if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace() || $event->getValue()=='Y')) { - $BirthDeath .= $event->print_simple_fact(true); + $BirthDeath .= $event->summary(); if (in_array($deattag, $opt_tags)) { unset ($opt_tags[array_search($deattag, $opt_tags)]); } @@ -209,7 +208,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { foreach ($opt_tags as $tag) { $event = $person->getFirstFact($tag); if ($event) { - $BirthDeath .= $event->print_simple_fact(true); + $BirthDeath .= $event->summary(); } } } diff --git a/library/WT/Controller/Ancestry.php b/library/WT/Controller/Ancestry.php index c1bccc4384..d8da058056 100644 --- a/library/WT/Controller/Ancestry.php +++ b/library/WT/Controller/Ancestry.php @@ -143,9 +143,7 @@ class WT_Controller_Ancestry extends WT_Controller_Chart { echo '  ', ($sosa*2+1), '  '; if ($family->canShow()) { foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) { - echo ' '; - $fact->print_simple_fact(); - echo ''; + echo ' ', $fact->summary(), ''; } } echo ''; @@ -157,4 +155,4 @@ class WT_Controller_Ancestry extends WT_Controller_Chart { } echo ''; } -} \ No newline at end of file +} diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php index 7f8cc1d510..e6074a50da 100644 --- a/library/WT/Controller/Descendancy.php +++ b/library/WT/Controller/Descendancy.php @@ -200,9 +200,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { echo "getXref().$personcount."'); return false;\" class=\"top\">getXref().$personcount."_img\" class=\"icon-minus\" title=\"".WT_I18N::translate('View family')."\">"; if ($family->canShow()) { foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) { - echo ' '; - $fact->print_simple_fact(); - echo ''; + echo ' ', $fact->summary(), ''; } } echo ''; diff --git a/library/WT/Controller/Lifespan.php b/library/WT/Controller/Lifespan.php index d5d7eaae75..c4264caf7f 100644 --- a/library/WT/Controller/Lifespan.php +++ b/library/WT/Controller/Lifespan.php @@ -447,18 +447,18 @@ class WT_Controller_Lifespan extends WT_Controller_Page { $text = explode("-fact, ", $val); $fact = $text[0]; $val = $text[1]; - echo '', WT_Gedcom_Tag::getAbbreviation($fact), ''; + echo '', self::getAbbreviation($fact), ''; } $indiName = $value->getFullName(); echo '' , '
'; - echo WT_Gedcom_Tag::getAbbreviation('BIRT'); + echo self::getAbbreviation('BIRT'); echo '', $value->getSexImage(), $indiName, '
', WT_Gedcom_Tag::getLabel('BIRT'), ' ', strip_tags($bdate->Display(false)), ' ', $value->getBirthPlace(), '
', '
', $value->getSexImage(), $indiName, ' ', $lifespan, ' '; if ($value->isDead()) { if ($deathReal || $value->isDead()) { echo ''; - echo WT_Gedcom_Tag::getAbbreviation('DEAT'); + echo self::getAbbreviation('DEAT'); if (!$deathReal) echo '*'; echo ''.$value->getSexImage().$indiName.'
'.WT_Gedcom_Tag::getLabel('DEAT').' '.strip_tags($ddate->Display(false)).' '.$value->getDeathPlace().'
'; } @@ -474,11 +474,11 @@ class WT_Controller_Lifespan extends WT_Controller_Page { $text = explode("-fact,", $val); $fact = $text[0]; $val = $text[1]; - echo ''.WT_Gedcom_Tag::getAbbreviation($fact).''; + echo ''.self::getAbbreviation($fact).''; } $indiName = $value->getFullName(); echo ''. ''. @@ -486,7 +486,7 @@ class WT_Controller_Lifespan extends WT_Controller_Page { if ($value->isDead()) { if ($deathReal || $value->isDead()) { echo ''; - echo WT_Gedcom_Tag::getAbbreviation('DEAT'); + echo self::getAbbreviation('DEAT'); if (!$deathReal) echo "*"; echo ''.$value->getSexImage().$indiName.'
'.WT_Gedcom_Tag::getLabel('DEAT').' '.strip_tags($ddate->Display(false)).' '.$value->getDeathPlace().'
'; } @@ -497,7 +497,7 @@ class WT_Controller_Lifespan extends WT_Controller_Page { echo '
'; $indiName = $value->getFullName(); echo ''; - echo WT_Gedcom_Tag::getAbbreviation('BIRT'); + echo self::getAbbreviation('BIRT'); echo ''.$value->getSexImage().$indiName.'
'.WT_Gedcom_Tag::getLabel('BIRT').' '.strip_tags($bdate->Display(false)).' '.$value->getBirthPlace().'
'; foreach ($eventinformation as $evtwidth=>$val) { $text = explode('-fact,', $val); @@ -549,4 +549,13 @@ class WT_Controller_Lifespan extends WT_Controller_Page { } return $list; } + + private static function getAbbreviation($tag) { + switch ($tag) { + case 'BIRT': return WT_I18N::translate_c('Abbreviation for birth', 'b.'); + case 'MARR': return WT_I18N::translate_c('Abbreviation for marriage', 'm.'); + case 'DEAT': return WT_I18N::translate_c('Abbreviation for death', 'd.'); + default: return utf8_substr(WT_Gedcom_Tag::getLabel($tag), 0, 1); // Just use the first letter of the full fact + } + } } diff --git a/library/WT/Fact.php b/library/WT/Fact.php index 5355272a4b..9e33133366 100644 --- a/library/WT/Fact.php +++ b/library/WT/Fact.php @@ -183,21 +183,17 @@ class WT_Fact { return $this->parent; } - function getLabel($abbreviate=false) { - if ($abbreviate) { - return WT_Gedcom_Tag::getAbbreviation($this->tag); - } else { - switch($this->tag) { - case 'EVEN': - case 'FACT': - if ($this->getAttribute('TYPE')) { - // Custom FACT/EVEN - with a TYPE - return WT_I18N::translate(WT_Filter::escapeHtml($this->getAttribute('TYPE'))); - } - // no break - drop into next case - default: - return WT_Gedcom_Tag::getLabel($this->tag, $this->parent); + function getLabel() { + switch($this->tag) { + case 'EVEN': + case 'FACT': + if ($this->getAttribute('TYPE')) { + // Custom FACT/EVEN - with a TYPE + return WT_I18N::translate(WT_Filter::escapeHtml($this->getAttribute('TYPE'))); } + // no break - drop into next case + default: + return WT_Gedcom_Tag::getLabel($this->tag, $this->parent); } } @@ -217,24 +213,33 @@ class WT_Fact { return $this->is_new; } - // Print a simple fact version of this event - function print_simple_fact($return=false, $anchor=false) { - global $ABBREVIATE_CHART_LABELS; - - $value = $this->getValue(); - - $data = ''.$this->getLabel($ABBREVIATE_CHART_LABELS).''; - // Don't display "yes", because format_fact_date() does this for us. (Should it?) - if ($value && $value != 'Y') { - $data .= ' ' . WT_Filter::escapeHtml($value) . ''; + // A one-line summary of the fact - for charts, etc. + function summary() { + $attributes = array(); + $target = $this->getTarget(); + if ($target) { + $attributes[] = $target->getFullName(); + } else { + $value = $this->getValue(); + if ($value && $value!='Y') { + $attributes[] = '' . WT_Filter::escapeHtml($value) . ''; + } + $date = $this->getDate(); + if ($date->isOK()) { + $attributes[] = $date->display(); + } + $place = (string)$this->getPlace(); + if ($place) { + $attributes[] = $place; + } } - $data .= ' '.format_fact_date($this, $this->getParent(), $anchor, false); - $data .= ' '.format_fact_place($this, $anchor, false, false); - $data .= '
'; - if ($return) { - return $data; + $html = WT_Gedcom_Tag::getLabelValue($this->getTag(), implode(' — ', $attributes), $this->getParent()); + if ($this->isNew()) { + return '
' . $html . '
'; + } elseif ($this->isOld()) { + return '
' . $html . '
'; } else { - echo $data; + return $html; } } diff --git a/library/WT/Gedcom/Tag.php b/library/WT/Gedcom/Tag.php index e2b4db7b01..6501b2336c 100644 --- a/library/WT/Gedcom/Tag.php +++ b/library/WT/Gedcom/Tag.php @@ -86,18 +86,6 @@ class WT_Gedcom_Tag { return in_array($tag, self::$ALL_TAGS); } - public static function getAbbreviation($tag) { - switch ($tag) { - case 'BIRT': return WT_I18N::translate_c('Abbreviation for birth', 'b.'); - case 'MARR': return WT_I18N::translate_c('Abbreviation for marriage', 'm.'); - case 'DEAT': return WT_I18N::translate_c('Abbreviation for death', 'd.'); - case 'PHON': return WT_I18N::translate_c('Abbreviation for telephone number', 't.'); - case 'FAX': return WT_I18N::translate_c('Abbreviation for fax number', 'f.'); - case 'EMAIL': return WT_I18N::translate_c('Abbreviation for email address', 'e.'); - default: return utf8_substr(self::getLabel($tag), 0, 1).'.'; // Just use the first letter of the full fact - } - } - // Translate a tag, for an (optional) record public static function getLabel($tag, $record=null) { if ($record instanceof WT_Individual) { @@ -848,7 +836,7 @@ class WT_Gedcom_Tag { // Translate a label/value pair, such as “Occupation: Farmer” public static function getLabelValue($tag, $value, $record=null, $element='div') { return - '<'.$element.' class="fact_'.preg_replace('/[^_A-Za-z0-9]/', '', $tag).'">'. + '<'.$element.' class="fact_' . $tag . '">'. /* I18N: a label/value pair, such as “Occupation: Farmer”. Some languages may need to change the punctuation. */ WT_I18N::translate('%1$s: %2$s', self::getLabel($tag, $record), $value). ''; diff --git a/library/WT/GedcomRecord.php b/library/WT/GedcomRecord.php index 89357e7a2d..37e0ab7dcc 100644 --- a/library/WT/GedcomRecord.php +++ b/library/WT/GedcomRecord.php @@ -388,7 +388,7 @@ class WT_GedcomRecord { list($gedrec)=explode("\n", $this->gedcom, 2); // Check each of the facts for access - foreach ($this->getFacts(null, $access_level) as $fact) { + foreach ($this->getFacts(null, false, $access_level) as $fact) { $gedrec .= "\n" . $fact->getGedcom(); } return $gedrec; @@ -785,7 +785,7 @@ class WT_GedcomRecord { } // The facts and events for this record - public function getFacts($filter=null, $access_level=WT_USER_ACCESS_LEVEL) { + public function getFacts($filter=null, $sort=false, $access_level=WT_USER_ACCESS_LEVEL) { $facts=array(); if ($this->canShow($access_level)) { foreach ($this->facts as $fact) { @@ -794,6 +794,9 @@ class WT_GedcomRecord { } } } + if ($sort) { + sort_facts($facts); + } return $facts; } @@ -882,7 +885,7 @@ class WT_GedcomRecord { $new_gedcom = '0 @' . $this->getXref() . '@ ' . static::RECORD_TYPE; $old_chan = $this->getFirstFact('CHAN'); // Replacing (or deleting) an existing fact - foreach ($this->getFacts(null, WT_PRIV_HIDE) as $fact) { + foreach ($this->getFacts(null, false, WT_PRIV_HIDE) as $fact) { if ($fact->getFactId() == $fact_id) { if ($gedcom) { $new_gedcom .= "\n" . $gedcom; @@ -1052,4 +1055,4 @@ class WT_GedcomRecord { } } } -} \ No newline at end of file +} diff --git a/library/WT/Individual.php b/library/WT/Individual.php index 54475e5685..529dfe5afa 100644 --- a/library/WT/Individual.php +++ b/library/WT/Individual.php @@ -94,7 +94,7 @@ class WT_Individual extends WT_GedcomRecord { 0 => array($user_individual), 1 => array(), ); - foreach ($user_individual->getFacts('FAM[CS]', WT_PRIV_HIDE) as $fact) { + foreach ($user_individual->getFacts('FAM[CS]', false, WT_PRIV_HIDE) as $fact) { $family = $fact->getTarget(); if ($family) { $cache[1][] = $family; @@ -122,7 +122,7 @@ class WT_Individual extends WT_GedcomRecord { if ($n % 2 == 0) { // Add FAM->INDI links foreach ($cache[$n-1] as $family) { - foreach ($family->getFacts('HUSB|WIFE|CHIL', WT_PRIV_HIDE) as $fact) { + foreach ($family->getFacts('HUSB|WIFE|CHIL', false, WT_PRIV_HIDE) as $fact) { $individual = $fact->getTarget(); // Don’t backtrack if ($individual && !in_array($individual, $cache[$n-2], true)) { @@ -136,7 +136,7 @@ class WT_Individual extends WT_GedcomRecord { } else { // Add INDI->FAM links foreach ($cache[$n-1] as $individual) { - foreach ($individual->getFacts('FAM[CS]', WT_PRIV_HIDE) as $fact) { + foreach ($individual->getFacts('FAM[CS]', false, WT_PRIV_HIDE) as $fact) { $family = $fact->getTarget(); // Don’t backtrack if ($family && !in_array($family, $cache[$n-2], true)) { @@ -596,7 +596,7 @@ class WT_Individual extends WT_GedcomRecord { global $SHOW_PRIVATE_RELATIONSHIPS; $families = array(); - foreach ($this->getFacts('FAMS', $access_level) as $fact) { + foreach ($this->getFacts('FAMS', false, $access_level) as $fact) { $family = $fact->getTarget(); if ($family && ($SHOW_PRIVATE_RELATIONSHIPS || $family->canShow($access_level))) { $families[] = $family; @@ -638,7 +638,7 @@ class WT_Individual extends WT_GedcomRecord { global $SHOW_PRIVATE_RELATIONSHIPS; $families = array(); - foreach ($this->getFacts('FAMC', $access_level) as $fact) { + foreach ($this->getFacts('FAMC', false, $access_level) as $fact) { $family = $fact->getTarget(); if ($family && ($SHOW_PRIVATE_RELATIONSHIPS || $family->canShow($access_level))) { $families[] = $family; diff --git a/library/WT/Report/Base.php b/library/WT/Report/Base.php index 3c8529ecaf..7627c01abd 100644 --- a/library/WT/Report/Base.php +++ b/library/WT/Report/Base.php @@ -2247,7 +2247,7 @@ function varSHandler($attrs) { $tfact = $type; } $var = str_replace(array("@fact", "@desc"), array(WT_Gedcom_Tag::getLabel($tfact), $desc), $var); - if (substr($var, 0, 18) == 'WT_I18N::translate' || substr($var, 0, 15) == 'WT_I18N::number' || substr($var, 0, 23)=='WT_Gedcom_Tag::getLabel') { + if (substr($var, 0, 18) == 'WT_I18N::translate' || substr($var, 0, 15) == 'WT_I18N::number') { eval("\$var=$var;"); } } @@ -2261,27 +2261,6 @@ function varSHandler($attrs) { $currentElement->addText($var); } -/** -* Variable lookup, retrieve the first letter only -* -* @param array $attrs an array of key value pairs for the attributes -*/ -function varLetterSHandler($attrs) { - global $currentElement, $fact, $desc; - - if (empty($attrs['var'])) { - die("REPORT ERROR varLetter: The attribute \"var=\" is missing or not set in the XML file."); - } - - $var=$attrs['var']; - if ($var) { - if ($var=='@fact') { - $var=$fact; - } - $currentElement->addText(WT_Gedcom_Tag::getAbbreviation($var)); - } -} - /** * @todo add info * @param array $attrs an array of key value pairs for the attributes @@ -2465,7 +2444,7 @@ function SetVarSHandler($attrs) { $value = preg_replace("/\\$".$match[$i][1]."/", $t, $value, 1); $i++; } - if (substr($value, 0, 18) == 'WT_I18N::translate' || substr($value, 0, 15) == 'WT_I18N::number' || substr($value, 0, 23)=='WT_Gedcom_Tag::getLabel') { + if (substr($value, 0, 18) == 'WT_I18N::translate' || substr($value, 0, 15) == 'WT_I18N::number') { eval("\$value = $value;"); } // Arithmetic functions diff --git a/library/WT/Tree.php b/library/WT/Tree.php index ef138206bc..80548d1d31 100644 --- a/library/WT/Tree.php +++ b/library/WT/Tree.php @@ -213,7 +213,6 @@ class WT_Tree { WT_Module::setDefaultAccess($tree_id); // Gedcom and privacy settings - set_gedcom_setting($tree_id, 'ABBREVIATE_CHART_LABELS', false); set_gedcom_setting($tree_id, 'ADVANCED_NAME_FACTS', 'NICK,_AKA'); set_gedcom_setting($tree_id, 'ADVANCED_PLAC_FACTS', ''); set_gedcom_setting($tree_id, 'ALLOW_THEME_DROPDOWN', true); diff --git a/modules_v3/GEDFact_assistant/CENS_ctrl.php b/modules_v3/GEDFact_assistant/CENS_ctrl.php index 2a799b8299..e33548bff4 100644 --- a/modules_v3/GEDFact_assistant/CENS_ctrl.php +++ b/modules_v3/GEDFact_assistant/CENS_ctrl.php @@ -58,7 +58,7 @@ echo ''; '; diff --git a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php index 3e86845bc6..81a70c9b28 100644 --- a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php +++ b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php @@ -29,7 +29,7 @@ echo '
-
+
- +
@@ -458,7 +458,7 @@
-
+
diff --git a/modules_v3/cemetery_report/report.xml b/modules_v3/cemetery_report/report.xml index 43c904b12b..75e6ab1d84 100644 --- a/modules_v3/cemetery_report/report.xml +++ b/modules_v3/cemetery_report/report.xml @@ -4,7 +4,7 @@ - + @@ -41,7 +41,7 @@ - + diff --git a/modules_v3/change_report/report.xml b/modules_v3/change_report/report.xml index dc76deaa59..9b95c2b9d6 100644 --- a/modules_v3/change_report/report.xml +++ b/modules_v3/change_report/report.xml @@ -112,7 +112,7 @@ - :
:
+ :
:
diff --git a/modules_v3/death_report/report.xml b/modules_v3/death_report/report.xml index 54e3c36084..ac596d1239 100644 --- a/modules_v3/death_report/report.xml +++ b/modules_v3/death_report/report.xml @@ -7,7 +7,7 @@ - + diff --git a/modules_v3/descendancy_report/report.xml b/modules_v3/descendancy_report/report.xml index 60a8b10c0d..66734d452c 100644 --- a/modules_v3/descendancy_report/report.xml +++ b/modules_v3/descendancy_report/report.xml @@ -555,7 +555,7 @@ - : + : @@ -572,7 +572,7 @@ - : + : @@ -591,7 +591,7 @@ - : + : diff --git a/modules_v3/fact_sources/report.xml b/modules_v3/fact_sources/report.xml index 810dd9b2c7..7e38c6bc3a 100644 --- a/modules_v3/fact_sources/report.xml +++ b/modules_v3/fact_sources/report.xml @@ -62,13 +62,13 @@ - + - + - + @@ -153,9 +153,9 @@ - + - + @@ -266,12 +266,12 @@ - - - - + + + + - + @@ -313,11 +313,11 @@ - + - + - + diff --git a/modules_v3/family_group_report/report.xml b/modules_v3/family_group_report/report.xml index 458b77b6fe..7345907e19 100644 --- a/modules_v3/family_group_report/report.xml +++ b/modules_v3/family_group_report/report.xml @@ -306,7 +306,7 @@ - + @@ -333,7 +333,7 @@ - + @@ -461,14 +461,14 @@ - ( - ) + ( - ) - ( - ) + ( - ) @@ -657,7 +657,7 @@ - + @@ -684,7 +684,7 @@ - + @@ -721,14 +721,14 @@ - ( - ) + ( - ) - ( - ) + ( - ) @@ -998,7 +998,7 @@ - + @@ -1025,7 +1025,7 @@ - + @@ -1066,7 +1066,7 @@ - ( - ) + ( - ) @@ -1075,7 +1075,7 @@ - ( - ) + ( - ) diff --git a/modules_v3/missing_facts_report/report.xml b/modules_v3/missing_facts_report/report.xml index cb2ee6aac0..08a71036b5 100644 --- a/modules_v3/missing_facts_report/report.xml +++ b/modules_v3/missing_facts_report/report.xml @@ -9,18 +9,18 @@ - - / - - - - - - - - - - + + / + + + + + + + + + +
'; - echo WT_Gedcom_Tag::getAbbreviation('BIRT'); + echo self::getAbbreviation('BIRT'); if (!$birthReal) echo '*'; echo ''.$value->getSexImage().$indiName.'
'.WT_Gedcom_Tag::getLabel('BIRT').' '.strip_tags($bdate->Display(false)).' '.$value->getBirthPlace().'
'.$value->getSexImage().$indiName.'