From e0c6d35d1258ffa85dc7a5892082073e46e4173a Mon Sep 17 00:00:00 2001 From: fisharebest Date: Sun, 20 Jun 2010 11:03:23 +0000 Subject: --- includes/functions/functions_date.php | 14 -------------- includes/functions/functions_print_lists.php | 4 ++-- includes/functions/functions_privacy.php | 14 +++++++------- 3 files changed, 9 insertions(+), 23 deletions(-) (limited to 'includes/functions') diff --git a/includes/functions/functions_date.php b/includes/functions/functions_date.php index d1584709a0..9bdf507e7f 100644 --- a/includes/functions/functions_date.php +++ b/includes/functions/functions_date.php @@ -126,20 +126,6 @@ function format_timestamp($time) { ' - '.date(str_replace('%', '', $TIME_FORMAT), $time).''); } -//////////////////////////////////////////////////////////////////////////////// -// Get the current julian day on the server -//////////////////////////////////////////////////////////////////////////////// -function server_jd() { - return timestamp_to_jd(time()); -} - -//////////////////////////////////////////////////////////////////////////////// -// Get the current julian day on the client -//////////////////////////////////////////////////////////////////////////////// -function client_jd() { - return timestamp_to_jd(client_time()); -} - //////////////////////////////////////////////////////////////////////////////// // Convert a unix-style timestamp into a julian-day //////////////////////////////////////////////////////////////////////////////// diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php index 765ee22282..5bd31df5ee 100644 --- a/includes/functions/functions_print_lists.php +++ b/includes/functions/functions_print_lists.php @@ -1548,7 +1548,7 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li // Print a final summary message about restricted/filtered facts $summary = ""; - if ($endjd==client_jd()) { + if ($endjd==WT_CLIENT_JD) { // We're dealing with the Today's Events block if ($output==0) { if ($filter==0) { @@ -1656,7 +1656,7 @@ function print_events_list($startjd, $endjd, $events='BIRT MARR DEAT', $only_liv // Print a final summary message about restricted/filtered facts $summary = ""; - if ($endjd==client_jd()) { + if ($endjd==WT_CLIENT_JD) { // We're dealing with the Today's Events block if ($output==0) { if ($filter==0) { diff --git a/includes/functions/functions_privacy.php b/includes/functions/functions_privacy.php index 6753b07176..1ddec215ba 100644 --- a/includes/functions/functions_privacy.php +++ b/includes/functions/functions_privacy.php @@ -90,7 +90,7 @@ function is_dead($indirec, $gedcom_id) { preg_match_all('/\n2 DATE (.+)/', $indirec, $date_matches); foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*$MAX_ALIVE_AGE) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*$MAX_ALIVE_AGE) { return true; } } @@ -106,7 +106,7 @@ function is_dead($indirec, $gedcom_id) { foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); // Assume fathers are no more than 40 years older than their children - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE+40)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE+40)) { return true; } } @@ -116,7 +116,7 @@ function is_dead($indirec, $gedcom_id) { foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); // Assume mothers are no more than 40 years older than their children - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE+40)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE+40)) { return true; } } @@ -132,7 +132,7 @@ function is_dead($indirec, $gedcom_id) { foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); // Assume marriage occurs after age of 10 - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE-10)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE-10)) { return true; } } @@ -148,7 +148,7 @@ function is_dead($indirec, $gedcom_id) { foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); // Assume max age difference between spouses of 40 years - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE+40)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE+40)) { return true; } } @@ -161,7 +161,7 @@ function is_dead($indirec, $gedcom_id) { // Assume children born after age of 15 foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE-15)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE-15)) { return true; } } @@ -175,7 +175,7 @@ function is_dead($indirec, $gedcom_id) { // Assume grandchildren born after age of 30 foreach ($date_matches[1] as $date_match) { $date=new GedcomDate($date_match); - if ($date->isOK() && $date->MaxJD() <= WT_TODAY_JD - 365*($MAX_ALIVE_AGE-30)) { + if ($date->isOK() && $date->MaxJD() <= WT_SERVER_JD - 365*($MAX_ALIVE_AGE-30)) { return true; } } -- cgit v1.3