diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-06-20 11:03:23 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-06-20 11:03:23 +0000 |
| commit | e0c6d35d1258ffa85dc7a5892082073e46e4173a (patch) | |
| tree | fff27f8a5c48f180dd22dfb432b2857ef7a6ed72 /includes/functions | |
| parent | 772c70240c6c1edf92f2b49d9546dba2c5a22acf (diff) | |
| download | webtrees-e0c6d35d1258ffa85dc7a5892082073e46e4173a.tar.gz webtrees-e0c6d35d1258ffa85dc7a5892082073e46e4173a.tar.bz2 webtrees-e0c6d35d1258ffa85dc7a5892082073e46e4173a.zip | |
Diffstat (limited to 'includes/functions')
| -rw-r--r-- | includes/functions/functions_date.php | 14 | ||||
| -rw-r--r-- | includes/functions/functions_print_lists.php | 4 | ||||
| -rw-r--r-- | includes/functions/functions_privacy.php | 14 |
3 files changed, 9 insertions, 23 deletions
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 @@ -127,20 +127,6 @@ function format_timestamp($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 //////////////////////////////////////////////////////////////////////////////// function timestamp_to_jd($time) { 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; } } |
