summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editconfig_gedcom.php10
-rw-r--r--help_text.php7
-rw-r--r--includes/functions/functions.php1
-rw-r--r--includes/set_gedcom_defaults.php1
-rw-r--r--modules/recent_changes/module.php6
-rw-r--r--modules/todays_events/module.php2
-rw-r--r--modules/todo/module.php2
-rw-r--r--modules/upcoming_events/module.php10
-rw-r--r--modules/yahrzeit/module.php10
-rw-r--r--pgv_to_wt.php1
10 files changed, 12 insertions, 38 deletions
diff --git a/editconfig_gedcom.php b/editconfig_gedcom.php
index b7eebd0c1c..aca0da1319 100644
--- a/editconfig_gedcom.php
+++ b/editconfig_gedcom.php
@@ -146,7 +146,6 @@ case 'update':
set_gedcom_setting(WT_GED_ID, 'COMMON_NAMES_REMOVE', safe_POST('NEW_COMMON_NAMES_REMOVE'));
set_gedcom_setting(WT_GED_ID, 'COMMON_NAMES_THRESHOLD', safe_POST('NEW_COMMON_NAMES_THRESHOLD'));
set_gedcom_setting(WT_GED_ID, 'CONTACT_USER_ID', safe_POST('NEW_CONTACT_USER_ID'));
- set_gedcom_setting(WT_GED_ID, 'DAYS_TO_SHOW_LIMIT', safe_POST('NEW_DAYS_TO_SHOW_LIMIT'));
set_gedcom_setting(WT_GED_ID, 'DEFAULT_PEDIGREE_GENERATIONS', safe_POST('NEW_DEFAULT_PEDIGREE_GENERATIONS'));
set_gedcom_setting(WT_GED_ID, 'DISPLAY_JEWISH_GERESHAYIM', safe_POST_bool('NEW_DISPLAY_JEWISH_GERESHAYIM'));
set_gedcom_setting(WT_GED_ID, 'DISPLAY_JEWISH_THOUSANDS', safe_POST_bool('NEW_DISPLAY_JEWISH_THOUSANDS'));
@@ -427,7 +426,6 @@ print_header(i18n::translate('GEDCOM configuration'));
</table>
<input type="hidden" name="action" value="update" />
-<input type="hidden" name="old_DAYS_TO_SHOW_LIMIT" value="<?php print $DAYS_TO_SHOW_LIMIT; ?>" />
<?php
if (!empty($error_msg)) print "<br /><span class=\"error\">".$error_msg."</span><br />\n";
$i = 0;
@@ -1490,14 +1488,6 @@ print_header(i18n::translate('GEDCOM configuration'));
</tr>
<tr>
<td class="descriptionbox nowrap">
- <?php echo i18n::translate('Upcoming events block day limit'), help_link('DAYS_TO_SHOW_LIMIT'); ?>
- </td>
- <td class="optionbox width60">
- <input type="text" name="NEW_DAYS_TO_SHOW_LIMIT" value="<?php print $DAYS_TO_SHOW_LIMIT; ?>" size="2" tabindex="<?php echo ++$i; ?>" />
- </td>
- </tr>
- <tr>
- <td class="descriptionbox nowrap">
<?php echo i18n::translate('Hit counters'), help_link('SHOW_COUNTER'); ?>
</td>
<td class="optionbox width60">
diff --git a/help_text.php b/help_text.php
index d545a53ae8..a7a07f0c14 100644
--- a/help_text.php
+++ b/help_text.php
@@ -2151,11 +2151,6 @@ case 'CONTACT_USER_ID':
$text=i18n::translate('The person to contact about the genealogical data on this site.');
break;
-case 'DAYS_TO_SHOW_LIMIT':
- $title=i18n::translate('Upcoming events block day limit');
- $text=i18n::translate('Enter the maximum number of days to show in Upcoming Events blocks. This number cannot be greater than 30. If you enter a larger value, 30 will be used.<br /><br />The value you enter here determines how far ahead <b>webtrees</b> looks when searching for upcoming events. The results of this search, done once daily, are copied into a temporary file.<br /><br />No Upcoming Events blocks on Index or Portal pages can request more days than this value. The larger you make this, the longer it will take to build the daily database extract, and the longer it will take to display the block, even when you request to display a number of days less than this setting.');
- break;
-
case 'DEFAULT_PEDIGREE_GENERATIONS':
$title=i18n::translate('Pedigree generations');
$text=i18n::translate('Set the default number of generations to display on Descendancy and Pedigree charts.');
@@ -3284,7 +3279,7 @@ case 'day_month':
case 'days_to_show':
$title=i18n::translate('Number of days to show');
- $text=i18n::translate('Enter the number of days to show. This number cannot be greater than <b>#DAYS_TO_SHOW_LIMIT#</b>. If you enter a larger value, that limit will be used.<br /><br />The limit shown is set by the administrator in the GEDCOM configuration, Display and Layout section, Hide &amp; Show sub-section.');
+ $text=i18n::translate('This is the number of days that <b>webtrees</b> should use when searching for events. This number cannot be greater than %d.', 30);
break;
case 'def_gedcom_date':
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index ad1463c1d5..0b5056daa7 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -197,7 +197,6 @@ function load_gedcom_settings($ged_id=WT_GED_ID) {
global $COMMON_NAMES_REMOVE; $COMMON_NAMES_REMOVE =get_gedcom_setting($ged_id, 'COMMON_NAMES_REMOVE');
global $COMMON_NAMES_THRESHOLD; $COMMON_NAMES_THRESHOLD =get_gedcom_setting($ged_id, 'COMMON_NAMES_THRESHOLD');
global $CONTACT_USER_ID; $CONTACT_USER_ID =get_gedcom_setting($ged_id, 'CONTACT_USER_ID');
- global $DAYS_TO_SHOW_LIMIT; $DAYS_TO_SHOW_LIMIT =get_gedcom_setting($ged_id, 'DAYS_TO_SHOW_LIMIT');
global $DEFAULT_PEDIGREE_GENERATIONS; $DEFAULT_PEDIGREE_GENERATIONS =get_gedcom_setting($ged_id, 'DEFAULT_PEDIGREE_GENERATIONS');
global $DISPLAY_JEWISH_GERESHAYIM; $DISPLAY_JEWISH_GERESHAYIM =get_gedcom_setting($ged_id, 'DISPLAY_JEWISH_GERESHAYIM');
global $DISPLAY_JEWISH_THOUSANDS; $DISPLAY_JEWISH_THOUSANDS =get_gedcom_setting($ged_id, 'DISPLAY_JEWISH_THOUSANDS');
diff --git a/includes/set_gedcom_defaults.php b/includes/set_gedcom_defaults.php
index dd8b3b612b..2fe074ebe7 100644
--- a/includes/set_gedcom_defaults.php
+++ b/includes/set_gedcom_defaults.php
@@ -51,7 +51,6 @@ set_gedcom_setting($ged_id, 'COMMON_NAMES_ADD', '');
set_gedcom_setting($ged_id, 'COMMON_NAMES_REMOVE', '');
set_gedcom_setting($ged_id, 'COMMON_NAMES_THRESHOLD', '40');
set_gedcom_setting($ged_id, 'CONTACT_USER_ID', WT_USER_ID);
-set_gedcom_setting($ged_id, 'DAYS_TO_SHOW_LIMIT', '7');
set_gedcom_setting($ged_id, 'DEFAULT_PEDIGREE_GENERATIONS', '4');
set_gedcom_setting($ged_id, 'DISPLAY_JEWISH_GERESHAYIM', true);
set_gedcom_setting($ged_id, 'DISPLAY_JEWISH_THOUSANDS', false);
diff --git a/modules/recent_changes/module.php b/modules/recent_changes/module.php
index 8b3de3a56b..f553d971e6 100644
--- a/modules/recent_changes/module.php
+++ b/modules/recent_changes/module.php
@@ -110,10 +110,8 @@ class recent_changes_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function configureBlock($block_id) {
- global $DAYS_TO_SHOW_LIMIT;
-
if (safe_POST_bool('save')) {
- set_block_setting($block_id, 'days', safe_POST_integer('days', 1, $DAYS_TO_SHOW_LIMIT, $DAYS_TO_SHOW_LIMIT));
+ set_block_setting($block_id, 'days', safe_POST_integer('days', 1, 30, 7));
set_block_setting($block_id, 'hide_empty', safe_POST_bool('hide_empty'));
set_block_setting($block_id, 'block', safe_POST_bool('block'));
echo WT_JS_START, 'window.opener.location.href=window.opener.location.href;window.close();', WT_JS_END;
@@ -122,7 +120,7 @@ class recent_changes_WT_Module extends WT_Module implements WT_Module_Block {
require_once WT_ROOT.'includes/functions/functions_edit.php';
- $days=get_block_setting($block_id, 'days', $DAYS_TO_SHOW_LIMIT);
+ $days=get_block_setting($block_id, 'days', 7);
echo '<tr><td class="descriptionbox wrap width33">';
echo i18n::translate('Number of days to show'), help_link('days_to_show');
echo '</td><td class="optionbox">';
diff --git a/modules/todays_events/module.php b/modules/todays_events/module.php
index 6659e1c458..85b37c81eb 100644
--- a/modules/todays_events/module.php
+++ b/modules/todays_events/module.php
@@ -45,7 +45,7 @@ class todays_events_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function getBlock($block_id, $template=true) {
- global $ctype, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $DAYS_TO_SHOW_LIMIT, $THEME_DIR;
+ global $ctype, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $THEME_DIR;
$filter =get_block_setting($block_id, 'filter', true);
$onlyBDM =get_block_setting($block_id, 'onlyBDM', true);
diff --git a/modules/todo/module.php b/modules/todo/module.php
index bb437856f8..3feede7c4f 100644
--- a/modules/todo/module.php
+++ b/modules/todo/module.php
@@ -134,8 +134,6 @@ class todo_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function configureBlock($block_id) {
- global $DAYS_TO_SHOW_LIMIT;
-
if (safe_POST_bool('save')) {
set_block_setting($block_id, 'show_other', safe_POST_bool('show_other'));
set_block_setting($block_id, 'show_unassigned', safe_POST_bool('show_unassigned'));
diff --git a/modules/upcoming_events/module.php b/modules/upcoming_events/module.php
index fb7d39afe4..bc6562ecdc 100644
--- a/modules/upcoming_events/module.php
+++ b/modules/upcoming_events/module.php
@@ -46,9 +46,9 @@ class upcoming_events_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function getBlock($block_id, $template=true) {
- global $ctype, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $WT_BLOCKS, $DAYS_TO_SHOW_LIMIT, $THEME_DIR;
+ global $ctype, $WT_IMAGE_DIR, $WT_IMAGES, $THEME_DIR;
- $days=get_block_setting($block_id, 'days', $DAYS_TO_SHOW_LIMIT);
+ $days=get_block_setting($block_id, 'days', 7);
$filter=get_block_setting($block_id, 'filter', true);
$onlyBDM=get_block_setting($block_id, 'onlyBDM', false);
$infoStyle=get_block_setting($block_id, 'infoStyle', 'table');
@@ -108,10 +108,8 @@ class upcoming_events_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function configureBlock($block_id) {
- global $DAYS_TO_SHOW_LIMIT;
-
if (safe_POST_bool('save')) {
- set_block_setting($block_id, 'days', safe_POST_integer('days', 1, $DAYS_TO_SHOW_LIMIT, $DAYS_TO_SHOW_LIMIT));
+ set_block_setting($block_id, 'days', safe_POST_integer('days', 1, 30, 7));
set_block_setting($block_id, 'filter', safe_POST_bool('filter'));
set_block_setting($block_id, 'onlyBDM', safe_POST_bool('onlyBDM'));
set_block_setting($block_id, 'infoStyle', safe_POST('infoStyle', array('list', 'table'), 'table'));
@@ -123,7 +121,7 @@ class upcoming_events_WT_Module extends WT_Module implements WT_Module_Block {
require_once WT_ROOT.'includes/functions/functions_edit.php';
- $days=get_block_setting($block_id, 'days', $DAYS_TO_SHOW_LIMIT);
+ $days=get_block_setting($block_id, 'days', 7);
echo '<tr><td class="descriptionbox wrap width33">';
echo i18n::translate('Number of days to show'), help_link('days_to_show');
echo '</td><td class="optionbox">';
diff --git a/modules/yahrzeit/module.php b/modules/yahrzeit/module.php
index 9bc6c6b53b..c941fcd2d3 100644
--- a/modules/yahrzeit/module.php
+++ b/modules/yahrzeit/module.php
@@ -45,9 +45,9 @@ class yahrzeit_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function getBlock($block_id, $template=true) {
- global $ctype, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $WT_BLOCKS, $DAYS_TO_SHOW_LIMIT, $SHOW_MARRIED_NAMES, $THEME_DIR;
+ global $ctype, $TEXT_DIRECTION, $WT_IMAGE_DIR, $WT_IMAGES, $WT_BLOCKS, $SHOW_MARRIED_NAMES, $THEME_DIR;
- $days=get_block_setting($block_id, 'days', $DAYS_TO_SHOW_LIMIT);
+ $days=get_block_setting($block_id, 'days', 7);
$infoStyle=get_block_setting($block_id, 'infoStyle', 'table');
$block=get_block_setting($block_id, 'block', true);
@@ -220,10 +220,8 @@ class yahrzeit_WT_Module extends WT_Module implements WT_Module_Block {
// Implement class WT_Module_Block
public function configureBlock($block_id) {
- global $DAYS_TO_SHOW_LIMIT;
-
if (safe_POST_bool('save')) {
- set_block_setting($block_id, 'days', safe_POST_integer('days', 1, $DAYS_TO_SHOW_LIMIT, $DAYS_TO_SHOW_LIMIT));
+ set_block_setting($block_id, 'days', safe_POST_integer('days', 1, 30, 7));
set_block_setting($block_id, 'infoStyle', safe_POST('infoStyle', array('list', 'table'), 'table'));
set_block_setting($block_id, 'block', safe_POST_bool('block'));
echo WT_JS_START, 'window.opener.location.href=window.opener.location.href;window.close();', WT_JS_END;
@@ -232,7 +230,7 @@ class yahrzeit_WT_Module extends WT_Module implements WT_Module_Block {
require_once WT_ROOT.'includes/functions/functions_edit.php';
- $days=get_block_setting($block_id, 'days', $DAYS_TO_SHOW_LIMIT);
+ $days=get_block_setting($block_id, 'days', 7);
echo '<tr><td class="descriptionbox wrap width33">';
echo i18n::translate('Number of days to show'), help_link('days_to_show');
echo '</td><td class="optionbox">';
diff --git a/pgv_to_wt.php b/pgv_to_wt.php
index 6c60fafdaa..9d650e1225 100644
--- a/pgv_to_wt.php
+++ b/pgv_to_wt.php
@@ -440,7 +440,6 @@ foreach (get_all_gedcoms() as $ged_id=>$gedcom) {
@set_gedcom_setting($ged_id, 'COMMON_NAMES_REMOVE', $COMMON_NAMES_REMOVE);
@set_gedcom_setting($ged_id, 'COMMON_NAMES_THRESHOLD', $COMMON_NAMES_THRESHOLD);
@set_gedcom_setting($ged_id, 'CONTACT_USER_ID', WT_USER_ID);
- @set_gedcom_setting($ged_id, 'DAYS_TO_SHOW_LIMIT', $DAYS_TO_SHOW_LIMIT);
@set_gedcom_setting($ged_id, 'DEFAULT_PEDIGREE_GENERATIONS', $DEFAULT_PEDIGREE_GENERATIONS);
@set_gedcom_setting($ged_id, 'DISPLAY_JEWISH_GERESHAYIM', $DISPLAY_JEWISH_GERESHAYIM);
@set_gedcom_setting($ged_id, 'DISPLAY_JEWISH_THOUSANDS', $DISPLAY_JEWISH_THOUSANDS);