summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-12-09 09:11:10 +0000
committerfisharebest <fisharebest@gmail.com>2010-12-09 09:11:10 +0000
commit3f4c3d4370b98fdad7416047ecd62c3ada4ef67f (patch)
treef36856a4d52a17d0c723cbe1a7ff9b56dc93971c /includes
parent49b8674909d10a91e2772c856bb963d91c92df1e (diff)
downloadwebtrees-3f4c3d4370b98fdad7416047ecd62c3ada4ef67f.tar.gz
webtrees-3f4c3d4370b98fdad7416047ecd62c3ada4ef67f.tar.bz2
webtrees-3f4c3d4370b98fdad7416047ecd62c3ada4ef67f.zip
Remove old/unused code
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_charts.php47
1 files changed, 19 insertions, 28 deletions
diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php
index 28ac00ecb1..04b44711e6 100644
--- a/includes/functions/functions_charts.php
+++ b/includes/functions/functions_charts.php
@@ -460,9 +460,8 @@ function print_family_children($famid, $childid = "", $sosa = 0, $label="", $per
* print the facts table for a family
*
* @param string $famid family gedcom ID
- * @param int $sosa optional child sosa number
*/
-function print_family_facts(&$family, $sosa = 0) {
+function print_family_facts(&$family) {
global $pbwidth, $pbheight;
global $nonfacts;
global $TEXT_DIRECTION, $GEDCOM;
@@ -488,37 +487,29 @@ function print_family_facts(&$family, $sosa = 0) {
if ($value->getTag()!="SOUR" && $value->getTag()!="OBJE" && $value->getTag()!="NOTE")
print_fact($value);
}
- // do not print otheritems for sosa
- if ($sosa == 0) {
- foreach ($indifacts as $key => $value) {
- $fact = $value->getTag();
- // -- handle special source fact case
- if ($fact == "SOUR") {
- print_main_sources($value->getGedComRecord(), 1, $famid, $value->getLineNumber());
- }
- // -- handle special note fact case
- else if ($fact == "NOTE") {
- print_main_notes($value->getGedComRecord(), 1, $famid, $value->getLineNumber());
- }
+ foreach ($indifacts as $key => $value) {
+ $fact = $value->getTag();
+ // -- handle special source fact case
+ if ($fact == "SOUR") {
+ print_main_sources($value->getGedComRecord(), 1, $famid, $value->getLineNumber());
+ }
+ // -- handle special note fact case
+ else if ($fact == "NOTE") {
+ print_main_notes($value->getGedComRecord(), 1, $famid, $value->getLineNumber());
}
- // NOTE: Print the media
- print_main_media($famid);
- }
- }
- else {
- if ($sosa==0) {
- echo "<span class=\"subheaders\">" . i18n::translate('Family Group Information');
- echo "</span><br />";
}
+ // NOTE: Print the media
+ print_main_media($famid);
+ } else {
+ echo "<span class=\"subheaders\">" . i18n::translate('Family Group Information');
+ echo "</span><br />";
echo "<table class=\"facts_table\">";
- if ($sosa == 0) {
- echo "<tr><td class=\"messagebox\" colspan=\"2\">";
- echo i18n::translate('No facts for this family.');
- echo "</td></tr>";
- }
+ echo "<tr><td class=\"messagebox\" colspan=\"2\">";
+ echo i18n::translate('No facts for this family.');
+ echo "</td></tr>";
}
// -- new fact link
- if ($sosa==0 && WT_USER_CAN_EDIT) {
+ if (WT_USER_CAN_EDIT) {
print_add_new_fact($famid, $indifacts, "FAM");
// -- new note