summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index_edit.php8
-rw-r--r--modules/todays_events/module.php12
2 files changed, 16 insertions, 4 deletions
diff --git a/index_edit.php b/index_edit.php
index f75d2116f2..60aa5e512a 100644
--- a/index_edit.php
+++ b/index_edit.php
@@ -34,8 +34,13 @@ define('WT_SCRIPT_NAME', 'index_edit.php');
require './includes/session.php';
require_once WT_ROOT.'includes/index_cache.php';
+$ctype=safe_REQUEST($_REQUEST, 'ctype', array('user', 'gedcom'));
+
+if (!$ctype) {
+ die("Internal error - missing ctype parameter");
+}
+
if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
-if (isset($_REQUEST['ctype'])) $ctype = $_REQUEST['ctype'];
if (isset($_REQUEST['main'])) $main = $_REQUEST['main'];
if (isset($_REQUEST['right'])) $right = $_REQUEST['right'];
if (isset($_REQUEST['setdefault'])) $setdefault = $_REQUEST['setdefault'];
@@ -55,7 +60,6 @@ if (!WT_USER_ID) {
if (!WT_USER_IS_ADMIN) $setdefault=false;
if (!isset($action)) $action='';
-if (!isset($ctype)) $ctype='user';
if (!isset($main)) $main=array();
if (!isset($right)) $right=array();
if (!isset($setdefault)) $setdefault=false;
diff --git a/modules/todays_events/module.php b/modules/todays_events/module.php
index 5015a61943..71d2af0804 100644
--- a/modules/todays_events/module.php
+++ b/modules/todays_events/module.php
@@ -51,7 +51,7 @@ class todays_events_WT_Module extends WT_Module implements WT_Module_Block {
$onlyBDM =get_block_setting($block_id, 'days', 'no');
$infoStyle =get_block_setting($block_id, 'days', 'style2');
$sortStyle =get_block_setting($block_id, 'days', 'alpha');
- $allowDownload=WT_USER_ID && get_block_setting($block_id, 'days', 1); // only allow if logged in
+ $allowDownload=WT_USER_ID && get_block_setting($block_id, 'allowDownload', true);
$todayjd=client_jd();
@@ -63,7 +63,7 @@ class todays_events_WT_Module extends WT_Module implements WT_Module_Block {
} else {
$name = WT_USER_NAME;
}
- $title .= "<a href=\"javascript: configure block\" onclick=\"window.open('index_edit.php?block_id={$block_id}', '_blank', 'top=50,left=50,width=600,height=350,scrollbars=1,resizable=1'); return false;\">";
+ $title .= "<a href=\"javascript: configure block\" onclick=\"window.open('index_edit.php?action=configure&amp;ctype={$ctype}&amp;block_id={$block_id}', '_blank', 'top=50,left=50,width=600,height=350,scrollbars=1,resizable=1'); return false;\">";
$title .= "<img class=\"adminicon\" src=\"$WT_IMAGE_DIR/".$WT_IMAGES["admin"]["small"]."\" width=\"15\" height=\"15\" border=\"0\" alt=\"".i18n::translate('Configure')."\" /></a>";
}
$title.=i18n::translate('On This Day ...').help_link('index_onthisday');
@@ -118,6 +118,14 @@ class todays_events_WT_Module extends WT_Module implements WT_Module_Block {
exit;
}
+ $filter =get_block_setting($block_id, 'days', 'all');
+ $onlyBDM =get_block_setting($block_id, 'days', 'no');
+ $infoStyle =get_block_setting($block_id, 'days', 'style2');
+ $sortStyle =get_block_setting($block_id, 'days', 'alpha');
+ $allowDownload=get_block_setting($block_id, 'allowDownload', true);
+
+ require_once WT_ROOT.'includes/functions/functions_edit.php';
+
?>
<tr><td class="descriptionbox wrap width33">
<?php