diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-07-10 16:15:05 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-07-10 16:15:05 +0000 |
| commit | 75f1f3236bb825f269c44046638fcafa8b2b123f (patch) | |
| tree | d052b3a40ef98ba6d267c710ad7218d80da4c138 /modules | |
| parent | e341e5ef698637acff9132b076fa8db9cbb438ed (diff) | |
| download | webtrees-75f1f3236bb825f269c44046638fcafa8b2b123f.tar.gz webtrees-75f1f3236bb825f269c44046638fcafa8b2b123f.tar.bz2 webtrees-75f1f3236bb825f269c44046638fcafa8b2b123f.zip | |
#587347 upcoming events--config
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/recent_changes/module.php | 6 | ||||
| -rw-r--r-- | modules/todays_events/module.php | 2 | ||||
| -rw-r--r-- | modules/todo/module.php | 2 | ||||
| -rw-r--r-- | modules/upcoming_events/module.php | 10 | ||||
| -rw-r--r-- | modules/yahrzeit/module.php | 10 |
5 files changed, 11 insertions, 19 deletions
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">'; |
