summaryrefslogtreecommitdiff
path: root/includes/functions
diff options
context:
space:
mode:
authorŁukasz Wilenski <wooc@gazeta.pl>2010-04-16 18:28:53 +0000
committerŁukasz Wilenski <wooc@gazeta.pl>2010-04-16 18:28:53 +0000
commit0cb0a8a350c03f2979cd6d85ec0dd38c5220411b (patch)
tree839946297c03c8ee33116ca11bcafcacb3005ad9 /includes/functions
parent76cf75a048cd3ebf3457a612be7c0df26679dd79 (diff)
downloadwebtrees-0cb0a8a350c03f2979cd6d85ec0dd38c5220411b.tar.gz
webtrees-0cb0a8a350c03f2979cd6d85ec0dd38c5220411b.tar.bz2
webtrees-0cb0a8a350c03f2979cd6d85ec0dd38c5220411b.zip
revert changes commited by mistake
Diffstat (limited to 'includes/functions')
-rw-r--r--includes/functions/functions_edit.php4
-rw-r--r--includes/functions/functions_print.php28
-rw-r--r--includes/functions/functions_print_lists.php20
3 files changed, 8 insertions, 44 deletions
diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php
index f59e32102e..0aa195f175 100644
--- a/includes/functions/functions_edit.php
+++ b/includes/functions/functions_edit.php
@@ -1901,9 +1901,7 @@ function print_add_layer($tag, $level=2, $printSaveButton=true) {
// Add some empty tags to create a new fact
function addSimpleTags($fact) {
global $ADVANCED_PLAC_FACTS;
- //luk
- //add_simple_tag("0 {$fact}");
- add_simple_tag($fact=='MARR' ? '0 MARR Y' : "0 {$fact}");
+ add_simple_tag("0 {$fact}");
add_simple_tag("0 DATE", $fact, translate_fact("{$fact}:DATE"));
add_simple_tag("0 PLAC", $fact, translate_fact("{$fact}:PLAC"));
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 6ddc3caef4..26cca97bad 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -1762,11 +1762,10 @@ function format_parents_age($pid, $birth_date=null) {
$title=i18n::translate('Parent\'s age');
break;
}
- // luk
if ($class) {
- $html.=' <span class="'.$class.'" title="'.$title.'">'.$parent->getSexImage('small', '', '', false).$age.'</span>';
+ $html.=' <span class="'.$class.'" title="'.$title.'">'.$parent->getSexImage().$age.'</span>';
} else {
- $html.=' <span title="'.$title.'">'.$parent->getSexImage('small', '', '', false).$age.'</span>';
+ $html.=' <span title="'.$title.'">'.$parent->getSexImage().$age.'</span>';
}
}
}
@@ -1937,31 +1936,8 @@ function format_fact_place(&$eventObj, $anchor=false, $sub=false, $lds=false) {
$ppart = preg_replace("/amp\%3B/", "", trim($ppart));
$tempURL .= "parent[{$pindex}]=".PrintReady($ppart).'&';
}
- /*
$tempURL .= 'level='.count($levels);
$html .= '<a href="'.encode_url($tempURL).'"> '.PrintReady($place).'</a>';
- */ //luk
- $tempURL .= 'level='.count($levels);
- $place_pic = ' ';
- global $TBLPREFIX, $WT_IMAGES, $WT_IMAGE_DIR, $GEDCOM;
- if (empty($ged)) $ged=$GEDCOM;
- $sql = "SELECT * FROM ".$TBLPREFIX."media WHERE m_file LIKE '%/places/%' AND m_gedfile=".WT_GED_ID;
- $rows=WT_DB::prepare($sql)->execute()->fetchAll(PDO::FETCH_ASSOC);
- foreach ($rows as $rowm) {
- // Get info on how to handle this media file
- $media=Media::getInstance($rowm["m_media"]);
- $rawTitle = $rowm["m_titl"];
- if (empty($rawTitle)) $rawTitle = get_gedcom_value("TITL", 2, $rowm["mm_gedrec"]);
- if (empty($rawTitle)) $rawTitle = basename($rowm["m_file"]);
- $mediaTitle = PrintReady(htmlspecialchars($rawTitle));
- $mainMedia = check_media_depth($rowm["m_file"], "NOTRUNC");
- $thumbnail = thumbnail_file($rowm["m_file"], true, false);
- if ($mediaTitle == PrintReady($place) && $media->canDisplayDetails()) {
- $place_pic .= "<a href=\"".$mainMedia."\" rel=\"clearbox[general_6]\" rev=\"".$rowm["m_media"]."::".$ged."::".$mediaTitle."::\"> <img src=\"".$WT_IMAGE_DIR."/".$WT_IMAGES["media"]["button"]."\" alt=\"".i18n::translate('Show photos?')."\" title= \"".i18n::translate('Show photos?')."\" border=\"0\" align=\"top\" /></a>";
- break;
- }
- }
- $html .= '<br /><a href="'.encode_url($tempURL).'"> '.PrintReady($place).'</a>'.$place_pic;
} else {
if (!$SEARCH_SPIDER) {
$html.=' -- ';
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index bd0b022d5d..068806d328 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -194,19 +194,15 @@ function print_indi_table($datalist, $legend="", $option="") {
} else {
$title='';
}
- // luk
if ($num==$primary) {
$class='list_item name2';
$sex_image=$person->getSexImage();
list($surn, $givn)=explode(',', $name['sort']);
- echo '<a ', $title, ' href="', encode_url($person->getLinkUrl()), '" class="', $class, '"> ', PrintReady($name['list']), '</a>', $sex_image, "";
} else {
- $class='list_item name3';
+ $class='list_item';
$sex_image='';
- $names_html[]='<a '.$title.' href="'.encode_url($person->getLinkUrl()).'" class="'.$class.'"> ['.PrintReady($name['list']).']</a>'.$sex_image;
- echo '<a ', $title, ' href="', encode_url($person->getLinkUrl()), '" class="', $class, '"> [', PrintReady($name['list']), ']</a>', $sex_image, "";
}
- //echo '<a ', $title, ' href="', encode_url($person->getLinkUrl()), '" class="', $class, '"> ', PrintReady($name['list']), '</a>', $sex_image, "<br/>";
+ echo '<a ', $title, ' href="', encode_url($person->getLinkUrl()), '" class="', $class, '">', PrintReady($name['list']), '</a>', $sex_image, "<br/>";
}
// Indi parents
echo $person->getPrimaryParentsNames("parents_$table_id details1", 'none');
@@ -570,10 +566,7 @@ function print_fam_table($datalist, $legend="", $option="") {
if (!$husb->isDead()) $tdclass .= " alive";
if (!$husb->getChildFamilyIds()) $tdclass .= " patriarch";
echo "<td class=\"", $tdclass, "\" align=\"", get_align($names[$n1]['list']), "\">";
- echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']);
- // luk
- if (isset($names[1]['list'])) echo " [", PrintReady($names[1]['list']), "]</a>";
- else echo "</a>";
+ echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
if ($tiny) echo $husb->getSexImage();
if ($n1!=$n2) {
echo "<br /><a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
@@ -622,10 +615,7 @@ function print_fam_table($datalist, $legend="", $option="") {
if (!$wife->isDead()) $tdclass .= " alive";
if (!$wife->getChildFamilyIds()) $tdclass .= " patriarch";
echo "<td class=\"", $tdclass, "\" align=\"", get_align($names[$n1]['list']), "\">";
- echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']);
- // luk
- if (isset($names[1]['list'])) echo " [", PrintReady($names[1]['list']), "]</a>";
- else echo "</a>";
+ echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
if ($tiny) echo $wife->getSexImage();
if ($n1!=$n2) {
echo "<br /><a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
@@ -1721,7 +1711,7 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li
//-- Record name(s)
$name = $value['name'];
if ($value['record']->getType()=="FAM") {
- $exp = explode(" + ", $name);
+ $exp = explode("<br />", $name);
$husb = $value['record']->getHusband();
if ($husb) $exp[0] .= $husb->getPrimaryParentsNames("parents_$table_id details1", "none");
$wife = $value['record']->getWife();